diff --git a/nutanix/services/prismv2/resource_nutanix_deploy_pc_v2.go b/nutanix/services/prismv2/resource_nutanix_deploy_pc_v2.go index a8bbf1d4..a9df4872 100644 --- a/nutanix/services/prismv2/resource_nutanix_deploy_pc_v2.go +++ b/nutanix/services/prismv2/resource_nutanix_deploy_pc_v2.go @@ -325,14 +325,17 @@ func schemaForPcConfig() *schema.Schema { }, "num_vcpus": { Type: schema.TypeInt, + Optional: true, Computed: true, }, "memory_size_bytes": { Type: schema.TypeInt, + Optional: true, Computed: true, }, "data_disk_size_bytes": { Type: schema.TypeInt, + Optional: true, Computed: true, }, }, @@ -669,7 +672,7 @@ func expandPCConfig(configData map[string]interface{}) *config.DomainManagerClus if credentials, ok := configData["credentials"]; ok { domainManagerClusterConfig.Credentials = expandCredentials(credentials.([]interface{})) } - if resourceConfig, ok := configData["resource_config"]; ok { + if resourceConfig, ok := configData[" "]; ok { domainManagerClusterConfig.ResourceConfig = expandResourceConfig(resourceConfig.([]interface{})[0].(map[string]interface{})) } @@ -977,6 +980,15 @@ func expandResourceConfig(resourceConfig map[string]interface{}) *config.DomainM } resourceConfigObj.ContainerExtIds = containerExtIdsListObj } + if numVcpus, ok := resourceConfig["num_vcpus"]; ok { + resourceConfigObj.NumVcpus = utils.IntPtr(numVcpus.(int)) + } + if memorySizeBytes, ok := resourceConfig["memory_size_bytes"]; ok { + resourceConfigObj.MemorySizeBytes = utils.Int64Ptr(int64(memorySizeBytes.(int))) + } + if dataDiskSizeBytes, ok := resourceConfig["data_disk_size_bytes"]; ok { + resourceConfigObj.DataDiskSizeBytes = utils.Int64Ptr(int64(dataDiskSizeBytes.(int))) + } return resourceConfigObj }