diff --git a/go.mod b/go.mod index 02151c8fc..f68995c7d 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/hashicorp/hcl/v2 v2.19.1 github.com/hashicorp/terraform-json v0.21.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 - github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240408221529-978a2abe24ed + github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240409145424-54d83dcc429c github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index f911045b9..3ef0aa6bf 100644 --- a/go.sum +++ b/go.sum @@ -185,8 +185,8 @@ github.com/hashicorp/terraform-plugin-mux v0.15.0 h1:+/+lDx0WUsIOpkAmdwBIoFU8UP9 github.com/hashicorp/terraform-plugin-mux v0.15.0/go.mod h1:9ezplb1Dyq394zQ+ldB0nvy/qbNAz3mMoHHseMTMaKo= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= -github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240408221529-978a2abe24ed h1:Phi4iNjgUCD+JlhFURS7HA7I9L9wER/gxVVABJgiSqk= -github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240408221529-978a2abe24ed/go.mod h1:npw8FXjOQN2fX8iCSZCpm/B1rbOhXqxcyyQJZTXrUV0= +github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240409145424-54d83dcc429c h1:LD0j5MIJSRi0dPsZhbHVE7VL34tF/n1ATJt7hc+c40U= +github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240409145424-54d83dcc429c/go.mod h1:npw8FXjOQN2fX8iCSZCpm/B1rbOhXqxcyyQJZTXrUV0= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= diff --git a/tfplan2cai/converters/google/resources/services/vmwareengine/vmwareengine_private_cloud.go b/tfplan2cai/converters/google/resources/services/vmwareengine/vmwareengine_private_cloud.go index 62b4d0366..e2970a014 100644 --- a/tfplan2cai/converters/google/resources/services/vmwareengine/vmwareengine_private_cloud.go +++ b/tfplan2cai/converters/google/resources/services/vmwareengine/vmwareengine_private_cloud.go @@ -87,6 +87,18 @@ func GetVmwareenginePrivateCloudApiObject(d tpgresource.TerraformResourceData, c } else if v, ok := d.GetOkExists("type"); !tpgresource.IsEmptyValue(reflect.ValueOf(typeProp)) && (ok || !reflect.DeepEqual(v, typeProp)) { obj["type"] = typeProp } + preferredZoneProp, err := expandVmwareenginePrivateCloudPreferredZone(d.Get("preferred_zone"), d, config) + if err != nil { + return nil, err + } else if v, ok := d.GetOkExists("preferred_zone"); !tpgresource.IsEmptyValue(reflect.ValueOf(preferredZoneProp)) && (ok || !reflect.DeepEqual(v, preferredZoneProp)) { + obj["preferredZone"] = preferredZoneProp + } + secondaryZoneProp, err := expandVmwareenginePrivateCloudSecondaryZone(d.Get("secondary_zone"), d, config) + if err != nil { + return nil, err + } else if v, ok := d.GetOkExists("secondary_zone"); !tpgresource.IsEmptyValue(reflect.ValueOf(secondaryZoneProp)) && (ok || !reflect.DeepEqual(v, secondaryZoneProp)) { + obj["secondaryZone"] = secondaryZoneProp + } return obj, nil } @@ -235,3 +247,11 @@ func expandVmwareenginePrivateCloudManagementClusterNodeTypeConfigsCustomCoreCou func expandVmwareenginePrivateCloudType(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } + +func expandVmwareenginePrivateCloudPreferredZone(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandVmwareenginePrivateCloudSecondaryZone(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +}