diff --git a/mmv1/third_party/tgc/resource_converters.go.tmpl b/mmv1/third_party/tgc/resource_converters.go.tmpl index 6ed0c4fec987..b310b29ba17e 100644 --- a/mmv1/third_party/tgc/resource_converters.go.tmpl +++ b/mmv1/third_party/tgc/resource_converters.go.tmpl @@ -92,9 +92,9 @@ import ( "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/sql" "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/storage" "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/vertexai" + "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/vmwareengine" "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/vpcaccess" "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/workbench" - "github.com/GoogleCloudPlatform/terraform-google-conversion/v7/tfplan2cai/converters/google/resources/services/vmwareengine" ) @@ -215,6 +215,7 @@ func ResourceConverters() map[string][]cai.ResourceConverter { "google_vertex_ai_dataset": {vertexai.ResourceConverterVertexAIDataset()}, "google_vmwareengine_network_peering": {vmwareengine.ResourceConverterVmwareengineNetworkPeering()}, "google_workbench_instance": {workbench.ResourceConverterWorkbenchInstance()}, + "google_vmwareengine_private_cloud": {vmwareengine.ResourceConverterVmwareenginePrivateCloud()}, {{- range $object := $.IamResources }} {{- if $object.IamClassName }} "{{ $object.TerraformName }}_iam_policy": { {{- $object.IamClassName }}IamPolicy()}, diff --git a/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.json b/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.json new file mode 100644 index 000000000000..3e54e80b7ff8 --- /dev/null +++ b/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.json @@ -0,0 +1,55 @@ +[ + { + "name": "//vmwareengine.googleapis.com/projects/{{.Provider.project}}/locations/us-central1-a/privateClouds/gg-asset-pc-00563-8560", + "asset_type": "vmwareengine.googleapis.com/PrivateCloud", + "ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", + "resource": { + "version": "v1", + "discovery_document_uri": "https://vmwareengine.googleapis.com/$discovery/rest", + "discovery_name": "PrivateCloud", + "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", + "data": { + "description": "Standard Private Cloud", + "managementCluster": { + "clusterId": "gg-asset-mgmt-cl-00563-8560", + "nodeTypeConfigs": { + "standard-72": { + "nodeCount": 3, + "customCoreCount": 36 + }, + "standard-128": { + "nodeCount": 3 + } + }, + "autoscalingSettings": { + "autoscalingPolicies": { + "autoscaling-policy": { + "nodeTypeId": "standard-72", + "scaleOutSize": 1, + "cpuThresholds": { + "scaleOut": 80, + "scaleIn": 15 + }, + "consumedMemoryThresholds": { + "scaleOut": 75, + "scaleIn": 20 + }, + "storageThresholds": { + "scaleOut": 80, + "scaleIn": 20 + } + } + }, + "minClusterNodeCount": 3, + "maxClusterNodeCount": 8, + "coolDownPeriod": "1800s" + } + }, + "networkConfig": { + "managementCidr": "192.168.0.0/24", + "vmwareEngineNetwork": "projects/{{.Provider.project}}/locations/global/vmwareEngineNetworks/test_vmware_network" + } + } + } + } +] \ No newline at end of file diff --git a/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.tf b/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.tf new file mode 100644 index 000000000000..05713d97e118 --- /dev/null +++ b/mmv1/third_party/tgc/tests/data/google_vmwareengine_private_cloud.tf @@ -0,0 +1,46 @@ +resource "google_vmwareengine_private_cloud" "main" { + name = "gg-asset-pc-00563-8560" + location = "us-central1-a" + description = "Standard Private Cloud" + project = "{{.Provider.project}}" + + network_config { + management_cidr = "192.168.0.0/24" + vmware_engine_network = "projects/{{.Provider.project}}/locations/global/vmwareEngineNetworks/test_vmware_network" + } + + management_cluster { + cluster_id = "gg-asset-mgmt-cl-00563-8560" + node_type_configs { + node_type_id = "standard-72" + node_count = 3 + custom_core_count = 36 + } + node_type_configs { + node_type_id = "standard-128" + node_count = 3 + } + autoscaling_settings { + autoscaling_policies { + autoscale_policy_id = "autoscaling-policy" + node_type_id = "standard-72" + scale_out_size = 1 + cpu_thresholds { + scale_out = 80 + scale_in = 15 + } + consumed_memory_thresholds { + scale_out = 75 + scale_in = 20 + } + storage_thresholds { + scale_out = 80 + scale_in = 20 + } + } + min_cluster_node_count = 3 + max_cluster_node_count = 8 + cool_down_period = "1800s" + } + } +} \ No newline at end of file