This commit is contained in:
2026-06-02 11:28:16 +03:00
parent af79f6ab3e
commit c734dcfff7
254 changed files with 10439 additions and 3751 deletions

View File

@@ -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)

View File

@@ -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
}