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

@@ -414,6 +414,10 @@ func dataSourceRgSchemaMake() map[string]*schema.Schema {
Type: schema.TypeFloat,
Computed: true,
},
"sdn_access_group_id": {
Type: schema.TypeString,
Computed: true,
},
}
return res
}

View File

@@ -261,6 +261,10 @@ func dataSourceRgListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
},
},
"sdn_access_group_id": {
Type: schema.TypeString,
Computed: true,
},
},
},
},

View File

@@ -115,6 +115,7 @@ func flattenResgroup(d *schema.ResourceData, details rg.RecordResourceGroup) err
d.Set("vins", details.VINS)
d.Set("cpu_allocation_parameter", details.CPUAllocationParameter)
d.Set("cpu_allocation_ratio", details.CPUAllocationRatio)
d.Set("sdn_access_group_id", details.SDNAccessGroupID)
return nil
}
@@ -202,6 +203,7 @@ func flattenRg(d *schema.ResourceData, itemRg rg.RecordResourceGroup) {
d.Set("vins", itemRg.VINS)
d.Set("cpu_allocation_parameter", itemRg.CPUAllocationParameter)
d.Set("cpu_allocation_ratio", itemRg.CPUAllocationRatio)
d.Set("sdn_access_group_id", itemRg.SDNAccessGroupID)
}
func flattenRgAudits(rgAudits rg.ListAudits) []map[string]interface{} {
@@ -254,6 +256,7 @@ func flattenRgList(rgl *rg.ListResourceGroups) []map[string]interface{} {
"uniq_pools": rg.UniqPools,
"cpu_allocation_parameter": rg.CPUAllocationParameter,
"cpu_allocation_ratio": rg.CPUAllocationRatio,
"sdn_access_group_id": rg.SDNAccessGroupID,
}
res = append(res, temp)
}

View File

@@ -160,6 +160,10 @@ func resourceResgroupCreate(ctx context.Context, d *schema.ResourceData, m inter
req.ExtIP = extIp.(string)
}
if sdnAccessGroupID, ok := d.GetOk("sdn_access_group_id"); ok {
req.SDNAccessGroupID = sdnAccessGroupID.(string)
}
apiResp, err := c.CloudAPI().RG().Create(ctx, req)
if err != nil {
return diag.FromErr(err)
@@ -703,6 +707,12 @@ func ResourceRgSchemaMake() map[string]*schema.Schema {
Default: true,
Description: "flag for enable/disable RG",
},
"sdn_access_group_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "ID of the SDN access group",
},
"account_name": {
Type: schema.TypeString,
@@ -731,6 +741,14 @@ func ResourceRgSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
},
},
"created_by": {
Type: schema.TypeString,
Computed: true,
},
"created_time": {
Type: schema.TypeInt,
Computed: true,
},
"deleted_by": {
Type: schema.TypeString,
Computed: true,