4.4.3
This commit is contained in:
@@ -735,7 +735,7 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
|
||||
Name: d.Get("name").(string),
|
||||
}
|
||||
|
||||
if desc, ok := d.GetOk("desc"); ok {
|
||||
if desc, ok := d.GetOk("description"); ok {
|
||||
req.Description = desc.(string)
|
||||
}
|
||||
|
||||
@@ -1504,8 +1504,8 @@ func disksSubresourceSchemaMake() map[string]*schema.Schema {
|
||||
},
|
||||
"permanently": {
|
||||
Type: schema.TypeBool,
|
||||
Computed: true,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "Disk deletion status",
|
||||
},
|
||||
"disk_id": {
|
||||
@@ -1613,15 +1613,15 @@ func ResourceComputeSchemaMake() map[string]*schema.Schema {
|
||||
Description: "Name of this compute. Compute names are case sensitive and must be unique in the resource group.",
|
||||
},
|
||||
"rg_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
// ForceNew: true,
|
||||
ValidateFunc: validation.IntAtLeast(1),
|
||||
Description: "ID of the resource group where this compute should be deployed.",
|
||||
},
|
||||
"driver": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
// ForceNew: true,
|
||||
StateFunc: statefuncs.StateFuncToUpper,
|
||||
ValidateFunc: validation.StringInSlice([]string{"SVA_KVM_X86", "KVM_X86", "KVM_PPC"}, false), // observe case while validating
|
||||
|
||||
@@ -97,14 +97,13 @@ func resourceResgroupCreate(ctx context.Context, d *schema.ResourceData, m inter
|
||||
setQuota = true
|
||||
}
|
||||
|
||||
log.Debugf("resourceResgroupCreate: called by user %q for RG name %s, account ID %d",
|
||||
c.GetDecortUsername(),
|
||||
log.Debugf("resourceResgroupCreate: called for RG name %s, account ID %d",
|
||||
// c.GetDecortUsername(),
|
||||
rgName.(string), d.Get("account_id").(int))
|
||||
|
||||
req.AccountID = uint64(d.Get("account_id").(int))
|
||||
req.Name = rgName.(string)
|
||||
req.GID = uint64(location.DefaultGridID)
|
||||
req.Owner = c.GetDecortUsername()
|
||||
|
||||
if setQuota {
|
||||
req.MaxCPUCapacity = int64(quotaRecord.Cpu)
|
||||
@@ -121,6 +120,11 @@ func resourceResgroupCreate(ctx context.Context, d *schema.ResourceData, m inter
|
||||
d.Set("def_net_type", "PRIVATE")
|
||||
}
|
||||
|
||||
owner, ok := d.GetOk("owner")
|
||||
if ok {
|
||||
req.Owner = owner.(string)
|
||||
}
|
||||
|
||||
ipcidr, ok := d.GetOk("ipcidr")
|
||||
if ok {
|
||||
req.IPCIDR = ipcidr.(string)
|
||||
@@ -658,6 +662,11 @@ func ResourceRgSchemaMake() map[string]*schema.Schema {
|
||||
Description: "Address of the netowrk inside the private network segment (aka ViNS) if def_net_type=PRIVATE",
|
||||
},
|
||||
|
||||
"owner": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
|
||||
"ext_net_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
|
||||
Reference in New Issue
Block a user