From f14861882742a27fb9c5170fe8637f1ce6c8b26b Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 30 Aug 2024 10:38:30 -0700 Subject: [PATCH] Fix post-6.0.0 TGC issues (#11581) (#2735) [upstream:1b55ddfc9c700a45cc366b3262aa10fb3744cbb3] Signed-off-by: Modular Magician --- go.mod | 2 +- go.sum | 4 ++-- .../templates/example_alloydb_instance.json | 10 +++++++++- .../example_artifact_registry_repository.json | 3 +++ ...ery_dataset_iam_policy_empty_policy_data.json | 3 +++ .../templates/example_bigtable_instance.json | 1 - .../templates/example_cloud_run_mapping.json | 6 ++++++ .../templates/example_cloud_run_service.json | 3 +++ .../templates/example_cloud_run_v2_job.json | 3 +++ .../templates/example_compute_address.json | 6 +++--- .../example_compute_global_address.json | 4 +++- .../templates/example_compute_snapshot.json | 3 +++ .../templates/example_compute_vpn_tunnel.json | 16 +++++++++++++++- .../templates/example_dns_managed_zone.json | 3 +++ .../templates/example_filestore_instance.json | 3 +++ .../templates/example_gke_hub_feature.json | 3 ++- .../example_google_cloudfunctions_function.json | 1 - .../example_google_dataproc_cluster.json | 3 +-- ...ple_google_datastream_connection_profile.json | 3 +++ .../example_google_datastream_stream.json | 14 +++++++++++++- ...ple_google_datastream_stream_append_only.json | 14 +++++++++++++- .../templates/example_kms_crypto_key.json | 3 +++ .../example_kms_crypto_key_iam_binding.json | 3 +++ .../example_kms_crypto_key_iam_member.json | 3 +++ .../example_kms_crypto_key_iam_policy.json | 3 +++ .../example_monitoring_notification_channel.json | 3 +-- .../templates/example_project_create.json | 1 - .../example_project_create_empty_project_id.json | 1 - ...empty_project_id_without_default_project.json | 1 - .../templates/example_project_update.json | 1 - .../templates/example_spanner_database.json | 3 +++ .../example_spanner_database_iam_binding.json | 3 +++ .../example_spanner_database_iam_member.json | 3 +++ .../example_spanner_database_iam_policy.json | 3 +++ .../example_spanner_instance_iam_binding.json | 3 +++ .../example_spanner_instance_iam_member.json | 3 +++ .../example_spanner_instance_iam_policy.json | 3 +++ .../templates/full_compute_instance.json | 1 - .../templates/full_container_cluster.json | 1 - .../templates/full_container_node_pool.json | 1 - .../templates/full_sql_database_instance.json | 3 +++ .../testdata/templates/full_storage_bucket.json | 1 - 42 files changed, 129 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index 0267616d8..611fa90bd 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/hashicorp/hcl/v2 v2.20.1 github.com/hashicorp/terraform-json v0.22.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 - github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240829230502-f590ae668a68 + github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240830173451-3e4b099dba8a github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index 00d564467..c8456e2fe 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,8 @@ github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c= github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0= -github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240829230502-f590ae668a68 h1:3qFBCfB2GyStGriu+WphG4u2PWjS7UlYuK2vmwVeP8I= -github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240829230502-f590ae668a68/go.mod h1:UweFt1y4JaSHAS8NtceJLCaaMy4j68gJwEo9sCaswG8= +github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240830173451-3e4b099dba8a h1:NadwY8+nmnq48IZ1+Y6sMs2tcqs+Bih81B2gcvsFztI= +github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20240830173451-3e4b099dba8a/go.mod h1:UweFt1y4JaSHAS8NtceJLCaaMy4j68gJwEo9sCaswG8= 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/testdata/templates/example_alloydb_instance.json b/tfplan2cai/testdata/templates/example_alloydb_instance.json index 3cb342f85..313db7865 100644 --- a/tfplan2cai/testdata/templates/example_alloydb_instance.json +++ b/tfplan2cai/testdata/templates/example_alloydb_instance.json @@ -9,6 +9,9 @@ "parent":"//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data":{ "instanceType":"PRIMARY", + "labels": { + "goog-terraform-provisioned": "true" + }, "machineConfig":{ "cpuCount":2 } @@ -32,7 +35,12 @@ "initialUser":{ "password":"alloydb-cluster" }, - "network":"default" + "labels": { + "goog-terraform-provisioned": "true" + }, + "networkConfig": { + "network":"default" + } } }, "ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", diff --git a/tfplan2cai/testdata/templates/example_artifact_registry_repository.json b/tfplan2cai/testdata/templates/example_artifact_registry_repository.json index 8c2596d21..7c903a5cc 100644 --- a/tfplan2cai/testdata/templates/example_artifact_registry_repository.json +++ b/tfplan2cai/testdata/templates/example_artifact_registry_repository.json @@ -11,6 +11,9 @@ "data": { "description": "example docker repository", "format": "DOCKER", + "labels": { + "goog-terraform-provisioned": "true" + }, "mode": "STANDARD_REPOSITORY" } }, diff --git a/tfplan2cai/testdata/templates/example_bigquery_dataset_iam_policy_empty_policy_data.json b/tfplan2cai/testdata/templates/example_bigquery_dataset_iam_policy_empty_policy_data.json index f1a5ec56a..c985419ed 100644 --- a/tfplan2cai/testdata/templates/example_bigquery_dataset_iam_policy_empty_policy_data.json +++ b/tfplan2cai/testdata/templates/example_bigquery_dataset_iam_policy_empty_policy_data.json @@ -12,6 +12,9 @@ "datasetReference": { "datasetId": "example_dataset" }, + "labels": { + "goog-terraform-provisioned": "true" + }, "location": "US", "friendlyName": "" } diff --git a/tfplan2cai/testdata/templates/example_bigtable_instance.json b/tfplan2cai/testdata/templates/example_bigtable_instance.json index 3dfe0db72..33dcca6a3 100644 --- a/tfplan2cai/testdata/templates/example_bigtable_instance.json +++ b/tfplan2cai/testdata/templates/example_bigtable_instance.json @@ -10,7 +10,6 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "labels": { - "goog-terraform-provisioned": "true", "test-name": "test-value" }, "name": "projects/{{.Provider.project}}/instances/tf-instance" diff --git a/tfplan2cai/testdata/templates/example_cloud_run_mapping.json b/tfplan2cai/testdata/templates/example_cloud_run_mapping.json index b0ee7a454..279d350f6 100644 --- a/tfplan2cai/testdata/templates/example_cloud_run_mapping.json +++ b/tfplan2cai/testdata/templates/example_cloud_run_mapping.json @@ -12,6 +12,9 @@ "apiVersion": "domains.cloudrun.com/v1", "kind": "DomainMapping", "metadata": { + "labels": { + "goog-terraform-provisioned": "true" + }, "name": "tf-test-domain-meep.gcp.tfacc.hashicorptest.com", "namespace": "{{.Provider.project}}" }, @@ -36,6 +39,9 @@ "kind": "Service", "metadata": { "name": "tf-test-cloudrun-srv-beep", + "labels": { + "goog-terraform-provisioned": "true" + }, "namespace": "{{.Provider.project}}" }, "spec": { diff --git a/tfplan2cai/testdata/templates/example_cloud_run_service.json b/tfplan2cai/testdata/templates/example_cloud_run_service.json index 70c5a7a0e..8730d5045 100644 --- a/tfplan2cai/testdata/templates/example_cloud_run_service.json +++ b/tfplan2cai/testdata/templates/example_cloud_run_service.json @@ -15,6 +15,9 @@ "annotations": { "generated-by": "magic-modules" }, + "labels": { + "goog-terraform-provisioned": "true" + }, "name": "cloudrun-to-get-cai", "namespace": "{{.Provider.project}}" }, diff --git a/tfplan2cai/testdata/templates/example_cloud_run_v2_job.json b/tfplan2cai/testdata/templates/example_cloud_run_v2_job.json index 394248652..e49031623 100644 --- a/tfplan2cai/testdata/templates/example_cloud_run_v2_job.json +++ b/tfplan2cai/testdata/templates/example_cloud_run_v2_job.json @@ -8,6 +8,9 @@ "discovery_name":"Job", "parent":"//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data":{ + "labels": { + "goog-terraform-provisioned": "true" + }, "template":{ "template":{ "containers":[ diff --git a/tfplan2cai/testdata/templates/example_compute_address.json b/tfplan2cai/testdata/templates/example_compute_address.json index 73d9e8898..56b2d7322 100644 --- a/tfplan2cai/testdata/templates/example_compute_address.json +++ b/tfplan2cai/testdata/templates/example_compute_address.json @@ -28,6 +28,9 @@ "address": "10.0.42.42", "addressType": "INTERNAL", "name": "my-internal-address", + "labels": { + "goog-terraform-provisioned": "true" + }, "region": "projects/{{.Provider.project}}/global/regions/us-central1" } } @@ -46,9 +49,6 @@ "logConfig": { "enable": false }, - "labels": { - "goog-terraform-provisioned": "true" - }, "name": "my-subnet", "region": "projects/{{.Provider.project}}/global/regions/us-central1" } diff --git a/tfplan2cai/testdata/templates/example_compute_global_address.json b/tfplan2cai/testdata/templates/example_compute_global_address.json index 17cf91b3c..1331c6418 100644 --- a/tfplan2cai/testdata/templates/example_compute_global_address.json +++ b/tfplan2cai/testdata/templates/example_compute_global_address.json @@ -10,7 +10,9 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "addressType": "EXTERNAL", - "goog-terraform-provisioned": "true", + "labels": { + "goog-terraform-provisioned": "true" + }, "name": "global-appserver-ip" } } diff --git a/tfplan2cai/testdata/templates/example_compute_snapshot.json b/tfplan2cai/testdata/templates/example_compute_snapshot.json index d35246332..e3cb28eba 100644 --- a/tfplan2cai/testdata/templates/example_compute_snapshot.json +++ b/tfplan2cai/testdata/templates/example_compute_snapshot.json @@ -33,6 +33,9 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "name": "debian-disk", + "labels": { + "goog-terraform-provisioned": "true" + }, "sizeGb": 10, "sourceImage": "projects/debian-cloud/global/images/debian-8-jessie-v20170523", "type": "projects/{{.Provider.project}}/zones/us-central1-a/diskTypes/pd-ssd", diff --git a/tfplan2cai/testdata/templates/example_compute_vpn_tunnel.json b/tfplan2cai/testdata/templates/example_compute_vpn_tunnel.json index f35141fde..b919ce6ba 100644 --- a/tfplan2cai/testdata/templates/example_compute_vpn_tunnel.json +++ b/tfplan2cai/testdata/templates/example_compute_vpn_tunnel.json @@ -1,5 +1,16 @@ [ - "foo": "bar", + { + "name":"//compute.googleapis.com/projects/{{.Provider.project}}/regions/us-central1/vpnTunnels/tunnel-1", + "asset_type":"compute.googleapis.com/VpnTunnel", + "resource":{ + "version":"v1", + "discovery_document_uri":"https://www.googleapis.com/discovery/v1/apis/compute/beta/rest", + "discovery_name":"VpnTunnel", + "parent":"//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", + "data":{ + "ikeVersion":2, + "labels":{ + "foo":"bar", "goog-terraform-provisioned": "true" }, "name":"tunnel-1", @@ -61,6 +72,9 @@ "data":{ "addressType":"EXTERNAL", "name":"vpn-static-ip", + "labels": { + "goog-terraform-provisioned": "true" + }, "region":"projects/{{.Provider.project}}/global/regions/us-central1" } }, diff --git a/tfplan2cai/testdata/templates/example_dns_managed_zone.json b/tfplan2cai/testdata/templates/example_dns_managed_zone.json index 5fee4143e..b165a75bf 100644 --- a/tfplan2cai/testdata/templates/example_dns_managed_zone.json +++ b/tfplan2cai/testdata/templates/example_dns_managed_zone.json @@ -24,6 +24,9 @@ "nonExistence": "nsec3", "state": "on" }, + "labels": { + "goog-terraform-provisioned": "true" + }, "name": "publiczone", "privateVisibilityConfig": { "networks": [] diff --git a/tfplan2cai/testdata/templates/example_filestore_instance.json b/tfplan2cai/testdata/templates/example_filestore_instance.json index c7b29f655..1ead21634 100644 --- a/tfplan2cai/testdata/templates/example_filestore_instance.json +++ b/tfplan2cai/testdata/templates/example_filestore_instance.json @@ -15,6 +15,9 @@ "name": "share1" } ], + "labels": { + "goog-terraform-provisioned": "true" + }, "networks": [ { "connectMode": "DIRECT_PEERING", diff --git a/tfplan2cai/testdata/templates/example_gke_hub_feature.json b/tfplan2cai/testdata/templates/example_gke_hub_feature.json index fc13dafd9..32a8c6e08 100644 --- a/tfplan2cai/testdata/templates/example_gke_hub_feature.json +++ b/tfplan2cai/testdata/templates/example_gke_hub_feature.json @@ -11,7 +11,8 @@ "data": { "fleetDefaultMemberConfig": null, "labels": { - "foo": "bar" + "foo": "bar", + "goog-terraform-provisioned": "true" } } }, diff --git a/tfplan2cai/testdata/templates/example_google_cloudfunctions_function.json b/tfplan2cai/testdata/templates/example_google_cloudfunctions_function.json index e0ae59aef..8965a7c1a 100644 --- a/tfplan2cai/testdata/templates/example_google_cloudfunctions_function.json +++ b/tfplan2cai/testdata/templates/example_google_cloudfunctions_function.json @@ -15,7 +15,6 @@ "MY_CF_ENV": "my-cf-env" }, "labels": { - "goog-terraform-provisioned": "true", "my-cf-label-value": "my-cf-label-value" }, "location": "us-east1", diff --git a/tfplan2cai/testdata/templates/example_google_dataproc_cluster.json b/tfplan2cai/testdata/templates/example_google_dataproc_cluster.json index eea13a441..11f8739c4 100644 --- a/tfplan2cai/testdata/templates/example_google_dataproc_cluster.json +++ b/tfplan2cai/testdata/templates/example_google_dataproc_cluster.json @@ -57,8 +57,7 @@ } }, "labels": { - "foo": "bar", - "goog-terraform-provisioned": "true" + "foo": "bar" }, "projectId": "{{.Provider.project}}" } diff --git a/tfplan2cai/testdata/templates/example_google_datastream_connection_profile.json b/tfplan2cai/testdata/templates/example_google_datastream_connection_profile.json index 56e862f84..cd76928e5 100644 --- a/tfplan2cai/testdata/templates/example_google_datastream_connection_profile.json +++ b/tfplan2cai/testdata/templates/example_google_datastream_connection_profile.json @@ -11,6 +11,9 @@ "data": { "bigqueryProfile": null, "displayName": "Connection profile", + "labels": { + "goog-terraform-provisioned": "true" + }, "gcsProfile": { "bucket": "my-bucket", "rootPath": "/path" diff --git a/tfplan2cai/testdata/templates/example_google_datastream_stream.json b/tfplan2cai/testdata/templates/example_google_datastream_stream.json index 598a664e3..f70e4af24 100644 --- a/tfplan2cai/testdata/templates/example_google_datastream_stream.json +++ b/tfplan2cai/testdata/templates/example_google_datastream_stream.json @@ -13,6 +13,9 @@ }, "description": "Database of postgres", "friendlyName": "stpostgres", + "labels": { + "goog-terraform-provisioned": "true" + }, "location": "us-central1" } }, @@ -80,7 +83,10 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "bigqueryProfile": {}, - "displayName": "Connection profile" + "displayName": "Connection profile", + "labels": { + "goog-terraform-provisioned": "true" + } } }, "ancestors": ["organizations/{{.OrgID}}"], @@ -97,6 +103,9 @@ "data": { "bigqueryProfile": null, "displayName": "Source connection profile", + "labels": { + "goog-terraform-provisioned": "true" + }, "mysqlProfile": { "port": 3306, "username": "my-user" @@ -125,6 +134,9 @@ } }, "displayName": "postgres to bigQuery", + "labels": { + "goog-terraform-provisioned": "true" + }, "sourceConfig": { "mysqlSourceConfig": { "maxConcurrentBackfillTasks": 0, diff --git a/tfplan2cai/testdata/templates/example_google_datastream_stream_append_only.json b/tfplan2cai/testdata/templates/example_google_datastream_stream_append_only.json index bced423d4..9e5753954 100644 --- a/tfplan2cai/testdata/templates/example_google_datastream_stream_append_only.json +++ b/tfplan2cai/testdata/templates/example_google_datastream_stream_append_only.json @@ -13,6 +13,9 @@ }, "description": "Database of postgres", "friendlyName": "stpostgres", + "labels": { + "goog-terraform-provisioned": "true" + }, "location": "us-central1" } }, @@ -80,7 +83,10 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "bigqueryProfile": {}, - "displayName": "Connection profile" + "displayName": "Connection profile", + "labels": { + "goog-terraform-provisioned": "true" + } } }, "ancestors": ["organizations/{{.OrgID}}"], @@ -97,6 +103,9 @@ "data": { "bigqueryProfile": null, "displayName": "Source connection profile", + "labels": { + "goog-terraform-provisioned": "true" + }, "mysqlProfile": { "port": 3306, "username": "my-user" @@ -125,6 +134,9 @@ } }, "displayName": "postgres to bigQuery", + "labels": { + "goog-terraform-provisioned": "true" + }, "sourceConfig": { "mysqlSourceConfig": { "maxConcurrentBackfillTasks": 0, diff --git a/tfplan2cai/testdata/templates/example_kms_crypto_key.json b/tfplan2cai/testdata/templates/example_kms_crypto_key.json index 89120584a..d06ae073e 100644 --- a/tfplan2cai/testdata/templates/example_kms_crypto_key.json +++ b/tfplan2cai/testdata/templates/example_kms_crypto_key.json @@ -9,6 +9,9 @@ "discovery_name": "CryptoKey", "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { + "labels": { + "goog-terraform-provisioned": "true" + }, "purpose": "ENCRYPT_DECRYPT" } } diff --git a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_binding.json b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_binding.json index cd765e5bc..9507ba8d9 100644 --- a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_binding.json +++ b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_binding.json @@ -9,6 +9,9 @@ "discovery_name": "CryptoKey", "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { + "labels": { + "goog-terraform-provisioned": "true" + }, "purpose": "ENCRYPT_DECRYPT" } }, diff --git a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_member.json b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_member.json index f743cc71d..1194a09bb 100644 --- a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_member.json +++ b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_member.json @@ -9,6 +9,9 @@ "discovery_name": "CryptoKey", "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { + "labels": { + "goog-terraform-provisioned": "true" + }, "purpose": "ENCRYPT_DECRYPT" } }, diff --git a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_policy.json b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_policy.json index 64c09c1bf..5723bd1aa 100644 --- a/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_policy.json +++ b/tfplan2cai/testdata/templates/example_kms_crypto_key_iam_policy.json @@ -9,6 +9,9 @@ "discovery_name": "CryptoKey", "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { + "labels": { + "goog-terraform-provisioned": "true" + }, "purpose": "ENCRYPT_DECRYPT" } }, diff --git a/tfplan2cai/testdata/templates/example_monitoring_notification_channel.json b/tfplan2cai/testdata/templates/example_monitoring_notification_channel.json index 041873ba4..232e143ec 100644 --- a/tfplan2cai/testdata/templates/example_monitoring_notification_channel.json +++ b/tfplan2cai/testdata/templates/example_monitoring_notification_channel.json @@ -12,8 +12,7 @@ "displayName": "monitoring notification channel", "enabled": true, "labels": { - "email_address": "foo@bar.com", - "goog-terraform-provisioned": "true" + "email_address": "foo@bar.com" }, "type": "email" } diff --git a/tfplan2cai/testdata/templates/example_project_create.json b/tfplan2cai/testdata/templates/example_project_create.json index 0af0da564..6fee6849b 100644 --- a/tfplan2cai/testdata/templates/example_project_create.json +++ b/tfplan2cai/testdata/templates/example_project_create.json @@ -27,7 +27,6 @@ "data": { "name": "My Project", "labels": { - "goog-terraform-provisioned": "true", "project-label-key-a": "project-label-val-a" }, "projectId": "{{.Provider.project}}" diff --git a/tfplan2cai/testdata/templates/example_project_create_empty_project_id.json b/tfplan2cai/testdata/templates/example_project_create_empty_project_id.json index 1ce3e093d..2542819d2 100644 --- a/tfplan2cai/testdata/templates/example_project_create_empty_project_id.json +++ b/tfplan2cai/testdata/templates/example_project_create_empty_project_id.json @@ -26,7 +26,6 @@ "data": { "name": "My Project", "labels": { - "goog-terraform-provisioned": "true", "project-label-key-a": "project-label-val-a" } } diff --git a/tfplan2cai/testdata/templates/example_project_create_empty_project_id_without_default_project.json b/tfplan2cai/testdata/templates/example_project_create_empty_project_id_without_default_project.json index aa282c12d..066d2865d 100644 --- a/tfplan2cai/testdata/templates/example_project_create_empty_project_id_without_default_project.json +++ b/tfplan2cai/testdata/templates/example_project_create_empty_project_id_without_default_project.json @@ -24,7 +24,6 @@ "parent": "//cloudresourcemanager.googleapis.com/organizations/unknown", "data": { "labels": { - "goog-terraform-provisioned": "true", "project-label-key-a": "project-label-val-a" }, "name": "My Project" diff --git a/tfplan2cai/testdata/templates/example_project_update.json b/tfplan2cai/testdata/templates/example_project_update.json index 003a72b3e..0ca39ff9d 100644 --- a/tfplan2cai/testdata/templates/example_project_update.json +++ b/tfplan2cai/testdata/templates/example_project_update.json @@ -26,7 +26,6 @@ "parent": "//cloudresourcemanager.googleapis.com/organizations/12345", "data": { "labels": { - "goog-terraform-provisioned": "true", "project-label-key-a": "project-label-val-a" }, "name": "My New Project", diff --git a/tfplan2cai/testdata/templates/example_spanner_database.json b/tfplan2cai/testdata/templates/example_spanner_database.json index a65dc8e85..923a24bcf 100644 --- a/tfplan2cai/testdata/templates/example_spanner_database.json +++ b/tfplan2cai/testdata/templates/example_spanner_database.json @@ -30,6 +30,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-europe-west1", "displayName": "main-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "" diff --git a/tfplan2cai/testdata/templates/example_spanner_database_iam_binding.json b/tfplan2cai/testdata/templates/example_spanner_database_iam_binding.json index c299e1cf3..c61d01948 100644 --- a/tfplan2cai/testdata/templates/example_spanner_database_iam_binding.json +++ b/tfplan2cai/testdata/templates/example_spanner_database_iam_binding.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-europe-west1", "displayName": "main-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "my-instance" diff --git a/tfplan2cai/testdata/templates/example_spanner_database_iam_member.json b/tfplan2cai/testdata/templates/example_spanner_database_iam_member.json index c299e1cf3..c61d01948 100644 --- a/tfplan2cai/testdata/templates/example_spanner_database_iam_member.json +++ b/tfplan2cai/testdata/templates/example_spanner_database_iam_member.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-europe-west1", "displayName": "main-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "my-instance" diff --git a/tfplan2cai/testdata/templates/example_spanner_database_iam_policy.json b/tfplan2cai/testdata/templates/example_spanner_database_iam_policy.json index 36751e8e7..112bd99ea 100644 --- a/tfplan2cai/testdata/templates/example_spanner_database_iam_policy.json +++ b/tfplan2cai/testdata/templates/example_spanner_database_iam_policy.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-europe-west1", "displayName": "main-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "my-instance" diff --git a/tfplan2cai/testdata/templates/example_spanner_instance_iam_binding.json b/tfplan2cai/testdata/templates/example_spanner_instance_iam_binding.json index 73a1d1661..afd193846 100644 --- a/tfplan2cai/testdata/templates/example_spanner_instance_iam_binding.json +++ b/tfplan2cai/testdata/templates/example_spanner_instance_iam_binding.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-us-central1", "displayName": "spanner-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "spanner-instance" diff --git a/tfplan2cai/testdata/templates/example_spanner_instance_iam_member.json b/tfplan2cai/testdata/templates/example_spanner_instance_iam_member.json index 73a1d1661..afd193846 100644 --- a/tfplan2cai/testdata/templates/example_spanner_instance_iam_member.json +++ b/tfplan2cai/testdata/templates/example_spanner_instance_iam_member.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-us-central1", "displayName": "spanner-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "spanner-instance" diff --git a/tfplan2cai/testdata/templates/example_spanner_instance_iam_policy.json b/tfplan2cai/testdata/templates/example_spanner_instance_iam_policy.json index 2647e1bd1..e51a9bb88 100644 --- a/tfplan2cai/testdata/templates/example_spanner_instance_iam_policy.json +++ b/tfplan2cai/testdata/templates/example_spanner_instance_iam_policy.json @@ -12,6 +12,9 @@ "instance": { "config": "projects/{{.Provider.project}}/instanceConfigs/regional-us-central1", "displayName": "spanner-instance", + "labels": { + "goog-terraform-provisioned": "true" + }, "nodeCount": 1 }, "instanceId": "spanner-instance" diff --git a/tfplan2cai/testdata/templates/full_compute_instance.json b/tfplan2cai/testdata/templates/full_compute_instance.json index 28abeae8a..293347a55 100644 --- a/tfplan2cai/testdata/templates/full_compute_instance.json +++ b/tfplan2cai/testdata/templates/full_compute_instance.json @@ -74,7 +74,6 @@ ], "hostname": "test-hostname", "labels": { - "goog-terraform-provisioned": "true", "label_foo1": "label-bar1" }, "machineType": "projects/{{.Provider.project}}/zones/us-central1-a/machineTypes/n1-standard-1", diff --git a/tfplan2cai/testdata/templates/full_container_cluster.json b/tfplan2cai/testdata/templates/full_container_cluster.json index 7d9c4ec09..ccae83474 100644 --- a/tfplan2cai/testdata/templates/full_container_cluster.json +++ b/tfplan2cai/testdata/templates/full_container_cluster.json @@ -79,7 +79,6 @@ "diskType": "pd-standard", "imageType": "test-image_type", "labels": { - "goog-terraform-provisioned": "true", "test-label-key": "test-label-value" }, "localSsdCount": 42, diff --git a/tfplan2cai/testdata/templates/full_container_node_pool.json b/tfplan2cai/testdata/templates/full_container_node_pool.json index 1a35f3548..a9bb79031 100644 --- a/tfplan2cai/testdata/templates/full_container_node_pool.json +++ b/tfplan2cai/testdata/templates/full_container_node_pool.json @@ -29,7 +29,6 @@ "diskType": "pd-standard", "imageType": "test-image_type", "labels": { - "goog-terraform-provisioned": "true", "test-label-key": "test-label-value" }, "localSsdCount": 42, diff --git a/tfplan2cai/testdata/templates/full_sql_database_instance.json b/tfplan2cai/testdata/templates/full_sql_database_instance.json index 34f0e15b9..ce26a7290 100644 --- a/tfplan2cai/testdata/templates/full_sql_database_instance.json +++ b/tfplan2cai/testdata/templates/full_sql_database_instance.json @@ -98,6 +98,9 @@ "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", "data": { "addressType": "INTERNAL", + "labels": { + "goog-terraform-provisioned": "true" + }, "name": "private-ip-address", "prefixLength": 16, "purpose": "VPC_PEERING" diff --git a/tfplan2cai/testdata/templates/full_storage_bucket.json b/tfplan2cai/testdata/templates/full_storage_bucket.json index 598f472ae..7a25c4dfe 100644 --- a/tfplan2cai/testdata/templates/full_storage_bucket.json +++ b/tfplan2cai/testdata/templates/full_storage_bucket.json @@ -53,7 +53,6 @@ } }, "labels": { - "goog-terraform-provisioned": "true", "label_foo1": "label-bar1" }, "lifecycle": {