4.12.0
This commit is contained in:
@@ -399,6 +399,7 @@ func flattenVins(d *schema.ResourceData, vins *vins.RecordVINS) {
|
||||
d.Set("deleted_by", vins.DeletedBy)
|
||||
d.Set("deleted_time", vins.DeletedTime)
|
||||
d.Set("desc", vins.Description)
|
||||
d.Set("enable_secgroups", vins.EnableSecGroups)
|
||||
d.Set("gid", vins.GID)
|
||||
d.Set("guid", vins.GUID)
|
||||
d.Set("lock_status", vins.LockStatus)
|
||||
|
||||
@@ -144,6 +144,8 @@ func resourceVinsCreate(ctx context.Context, d *schema.ResourceData, m interface
|
||||
req.ZoneID = uint64(zoneID.(int))
|
||||
}
|
||||
|
||||
req.EnableSecGroups = d.Get("enable_secgroups").(bool)
|
||||
|
||||
id, err := c.CloudAPI().VINS().CreateInRG(ctx, req)
|
||||
if err != nil {
|
||||
d.SetId("")
|
||||
@@ -181,6 +183,8 @@ func resourceVinsCreate(ctx context.Context, d *schema.ResourceData, m interface
|
||||
req.ZoneID = uint64(zoneID.(int))
|
||||
}
|
||||
|
||||
req.EnableSecGroups = d.Get("enable_secgroups").(bool)
|
||||
|
||||
id, err := c.CloudAPI().VINS().CreateInAccount(ctx, req)
|
||||
if err != nil {
|
||||
d.SetId("")
|
||||
@@ -908,6 +912,12 @@ func resourceVinsSchemaMake() map[string]*schema.Schema {
|
||||
Computed: true,
|
||||
Description: "ID of the Zone to put ViNS into",
|
||||
}
|
||||
rets["enable_secgroups"] = &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "enable security groups",
|
||||
}
|
||||
|
||||
return rets
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user