This commit is contained in:
2025-08-04 16:11:16 +03:00
parent bae25296bb
commit 4b3f21d9be
239 changed files with 6585 additions and 784 deletions

View File

@@ -40,6 +40,7 @@ func flattenResgroup(d *schema.ResourceData, rgData *rg.RecordRG) {
d.Set("updated_time", rgData.UpdatedTime)
d.Set("vins", rgData.VINS)
d.Set("computes", rgData.VMs)
d.Set("sdn_access_group_id", rgData.SDNAccessGroupID)
}
func flattenRgAcl(rgACLs rg.ListACL) []map[string]interface{} {
@@ -411,6 +412,7 @@ func flattenRgList(rgl *rg.ListRG) []map[string]interface{} {
"updated_time": rg.UpdatedTime,
"vins": rg.VINS,
"vms": rg.VMs,
"sdn_access_group_id": rg.SDNAccessGroupID,
}
res = append(res, temp)
}
@@ -495,4 +497,5 @@ func flattenResourceRG(d *schema.ResourceData, rgData *rg.RecordRG) {
d.Set("updated_time", rgData.UpdatedTime)
d.Set("vins", rgData.VINS)
d.Set("vms", rgData.VMs)
d.Set("sdn_access_group_id", rgData.SDNAccessGroupID)
}

View File

@@ -137,6 +137,10 @@ func resourceResgroupCreate(ctx context.Context, d *schema.ResourceData, m inter
}
}
if sdnAccessGroupID, ok := d.GetOk("sdn_access_group_id"); ok {
req.SDNAccessGroupID = sdnAccessGroupID.(string)
}
rgID, err := c.CloudBroker().RG().Create(ctx, req)
if err != nil {
d.SetId("")

View File

@@ -199,6 +199,10 @@ func dataSourceRgSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
},
},
"sdn_access_group_id": {
Type: schema.TypeString,
Computed: true,
},
}
}
@@ -1967,6 +1971,10 @@ func dataSourceRgListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
},
},
"sdn_access_group_id": {
Type: schema.TypeString,
Computed: true,
},
},
},
},
@@ -2375,9 +2383,15 @@ func resourceRgSchemaMake() map[string]*schema.Schema {
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{"hugepages", "numa", "cpupin", "vfnic", "dpdk", "changemac"}, true),
ValidateFunc: validation.StringInSlice([]string{"hugepages", "numa", "cpupin", "vfnic", "dpdk", "changemac", "trunk"}, true),
},
},
"sdn_access_group_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "ID of the SDN access group",
},
"acl": {
Type: schema.TypeList,