4.13.1
4.13.1
This commit is contained in:
@@ -112,6 +112,7 @@ func flattenCompute(d *schema.ResourceData, computeRec *compute.RecordCompute, p
|
||||
d.Set("hot_resize", computeRec.HotResize)
|
||||
d.Set("network_interface_naming", computeRec.NetworkInterfaceNaming)
|
||||
d.Set("zone_id", computeRec.ZoneID)
|
||||
d.Set("folder_id", computeRec.FolderID)
|
||||
d.Set("os_version", computeRec.OSVersion)
|
||||
d.Set("cpu_pin", computeRec.CPUPin)
|
||||
d.Set("cpu_alignment_profile", computeRec.CPUAlignmentProfile.Name)
|
||||
@@ -436,6 +437,7 @@ func flattenComputeList(computes *compute.ListComputes) []map[string]interface{}
|
||||
"hot_resize": computeItem.HotResize,
|
||||
"network_interface_naming": computeItem.NetworkInterfaceNaming,
|
||||
"zone_id": computeItem.ZoneID,
|
||||
"folder_id": computeItem.FolderID,
|
||||
"weight": computeItem.Weight,
|
||||
}
|
||||
res = append(res, temp)
|
||||
@@ -527,6 +529,7 @@ func flattenDeletedComputeList(computes *compute.ListDeletedComputes) []map[stri
|
||||
"hot_resize": computeItem.HotResize,
|
||||
"network_interface_naming": computeItem.NetworkInterfaceNaming,
|
||||
"zone_id": computeItem.ZoneID,
|
||||
"folder_id": computeItem.FolderID,
|
||||
"weight": computeItem.Weight,
|
||||
}
|
||||
res = append(res, temp)
|
||||
@@ -877,6 +880,7 @@ func flattenDataCompute(d *schema.ResourceData, compFacts *compute.RecordCompute
|
||||
d.Set("hot_resize", compFacts.HotResize)
|
||||
d.Set("network_interface_naming", compFacts.NetworkInterfaceNaming)
|
||||
d.Set("zone_id", compFacts.ZoneID)
|
||||
d.Set("folder_id", compFacts.FolderID)
|
||||
d.Set("loader_meta_iso", flattenLoaderMetaIso(compFacts.LoaderMetaIso))
|
||||
d.Set("os_version", compFacts.OSVersion)
|
||||
d.Set("weight", compFacts.Weight)
|
||||
|
||||
@@ -1233,6 +1233,10 @@ func dataSourceComputeSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"folder_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"weight": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
@@ -1330,6 +1334,16 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
|
||||
Optional: true,
|
||||
Description: "Zone ID",
|
||||
},
|
||||
"folder_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "Find by VM folder ID",
|
||||
},
|
||||
"include_descendants": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Description: "Include computes from descendant folders",
|
||||
},
|
||||
"ignore_k8s": {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
@@ -1837,6 +1851,10 @@ func dataSourceComputeListSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"folder_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"weight": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
@@ -2396,6 +2414,10 @@ func dataSourceComputeListDeletedSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"folder_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"weight": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
@@ -4929,6 +4951,10 @@ func resourceComputeSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"folder_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"vgpus": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
|
||||
@@ -99,6 +99,12 @@ func utilityDataComputeListCheckPresence(ctx context.Context, d *schema.Resource
|
||||
if zoneID, ok := d.GetOk("zone_id"); ok {
|
||||
req.ZoneID = uint64(zoneID.(int))
|
||||
}
|
||||
if folderID, ok := d.GetOk("folder_id"); ok {
|
||||
req.FolderID = uint64(folderID.(int))
|
||||
}
|
||||
if includeDescendants, ok := d.GetOkExists("include_descendants"); ok {
|
||||
req.IncludeDescendants = includeDescendants.(bool)
|
||||
}
|
||||
|
||||
listComputes, err := c.CloudBroker().Compute().List(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user