From d5ada155f06634c66f8d438a50621fe7265be811 Mon Sep 17 00:00:00 2001 From: Zhenhua Li Date: Fri, 27 Sep 2024 15:29:36 -0700 Subject: [PATCH] Split tgc resource converters to service folders --- mmv1/provider/terraform_tgc.go | 150 +++++++++--------- mmv1/third_party/tgc/iam_helpers.go | 87 ---------- .../tgc/{ => services/apikeys}/apikeys_key.go | 6 +- .../appengine}/appengine_application.go | 4 +- .../appengine}/appengine_standard_version.go | 2 +- .../{ => services/bigquery}/bigquery_table.go | 2 +- .../bigtable}/bigtable_cluster.go | 2 +- .../bigtable}/bigtable_instance.go | 2 +- .../cloudfunctions_cloud_function.go | 2 +- .../cloudfunctions_function.go | 2 +- .../composer}/composer_environment.go | 2 +- .../tgc/{ => services/compute}/commitment.go | 8 +- .../compute}/compute_instance.go.tmpl | 0 .../compute}/compute_instance_group.go | 6 +- .../compute}/compute_security_policy.go | 2 +- .../compute}/compute_target_pool.go | 2 +- .../tgc/{ => services/container}/container.go | 2 +- .../tgc/{ => services/dataflow}/job.go | 4 +- .../dataproc}/dataproc_cluster.go | 2 +- .../firebase}/firebase_project.go | 6 +- .../{ => services/kms}/kms_crypto_key_iam.go | 2 +- .../{ => services/kms}/kms_key_ring_iam.go | 2 +- .../logging_billing_account_bucket_config.go | 2 +- .../logging}/logging_folder_bucket_config.go | 2 +- .../logging_organization_bucket_config.go | 2 +- .../logging}/logging_project_bucket_config.go | 2 +- .../monitoring}/monitoring_slo_helper.go | 0 .../pubsub}/pubsub_subscription_iam.go | 0 .../{ => services/resourcemanager}/folder.go | 2 +- .../resourcemanager}/folder_iam.go | 0 .../folder_organization_policy.go | 2 +- .../resourcemanager}/org_policy_policy.go | 2 +- .../resourcemanager}/organization_iam.go | 0 .../organization_iam_custom_role.go | 2 +- .../resourcemanager}/organization_policy.go | 2 +- .../{ => services/resourcemanager}/project.go | 2 +- .../resourcemanager}/project_iam.go | 0 .../project_iam_custom_role.go | 2 +- .../project_organization_policy.go | 2 +- .../resourcemanager}/project_service.go | 2 +- .../resourcemanager}/project_service_test.go | 2 +- .../resourcemanager}/service_account.go | 2 +- .../resourcemanager}/service_account_key.go | 2 +- .../spanner}/spanner_database_iam.go | 0 .../spanner}/spanner_instance_iam.go | 0 .../sql}/sql_database_instance.go | 2 +- .../storage}/iam_storage_bucket.go | 2 +- .../{ => services/storage}/storage_bucket.go | 2 +- .../storage}/storage_bucket_iam.go | 2 +- 49 files changed, 123 insertions(+), 214 deletions(-) delete mode 100644 mmv1/third_party/tgc/iam_helpers.go rename mmv1/third_party/tgc/{ => services/apikeys}/apikeys_key.go (99%) rename mmv1/third_party/tgc/{ => services/appengine}/appengine_application.go (99%) rename mmv1/third_party/tgc/{ => services/appengine}/appengine_standard_version.go (99%) rename mmv1/third_party/tgc/{ => services/bigquery}/bigquery_table.go (99%) rename mmv1/third_party/tgc/{ => services/bigtable}/bigtable_cluster.go (99%) rename mmv1/third_party/tgc/{ => services/bigtable}/bigtable_instance.go (99%) rename mmv1/third_party/tgc/{ => services/cloudfunctions}/cloudfunctions_cloud_function.go (99%) rename mmv1/third_party/tgc/{ => services/cloudfunctions}/cloudfunctions_function.go (99%) rename mmv1/third_party/tgc/{ => services/composer}/composer_environment.go (99%) rename mmv1/third_party/tgc/{ => services/compute}/commitment.go (99%) rename mmv1/third_party/tgc/{ => services/compute}/compute_instance.go.tmpl (100%) rename mmv1/third_party/tgc/{ => services/compute}/compute_instance_group.go (99%) rename mmv1/third_party/tgc/{ => services/compute}/compute_security_policy.go (99%) rename mmv1/third_party/tgc/{ => services/compute}/compute_target_pool.go (99%) rename mmv1/third_party/tgc/{ => services/container}/container.go (99%) rename mmv1/third_party/tgc/{ => services/dataflow}/job.go (99%) rename mmv1/third_party/tgc/{ => services/dataproc}/dataproc_cluster.go (99%) rename mmv1/third_party/tgc/{ => services/firebase}/firebase_project.go (99%) rename mmv1/third_party/tgc/{ => services/kms}/kms_crypto_key_iam.go (99%) rename mmv1/third_party/tgc/{ => services/kms}/kms_key_ring_iam.go (99%) rename mmv1/third_party/tgc/{ => services/logging}/logging_billing_account_bucket_config.go (99%) rename mmv1/third_party/tgc/{ => services/logging}/logging_folder_bucket_config.go (99%) rename mmv1/third_party/tgc/{ => services/logging}/logging_organization_bucket_config.go (99%) rename mmv1/third_party/tgc/{ => services/logging}/logging_project_bucket_config.go (99%) rename mmv1/third_party/tgc/{ => services/monitoring}/monitoring_slo_helper.go (100%) rename mmv1/third_party/tgc/{ => services/pubsub}/pubsub_subscription_iam.go (100%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/folder.go (98%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/folder_iam.go (100%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/folder_organization_policy.go (98%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/org_policy_policy.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/organization_iam.go (100%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/organization_iam_custom_role.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/organization_policy.go (98%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project_iam.go (100%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project_iam_custom_role.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project_organization_policy.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project_service.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/project_service_test.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/service_account.go (99%) rename mmv1/third_party/tgc/{ => services/resourcemanager}/service_account_key.go (99%) rename mmv1/third_party/tgc/{ => services/spanner}/spanner_database_iam.go (100%) rename mmv1/third_party/tgc/{ => services/spanner}/spanner_instance_iam.go (100%) rename mmv1/third_party/tgc/{ => services/sql}/sql_database_instance.go (99%) rename mmv1/third_party/tgc/{ => services/storage}/iam_storage_bucket.go (99%) rename mmv1/third_party/tgc/{ => services/storage}/storage_bucket.go (99%) rename mmv1/third_party/tgc/{ => services/storage}/storage_bucket_iam.go (99%) diff --git a/mmv1/provider/terraform_tgc.go b/mmv1/provider/terraform_tgc.go index d3e45ef44d32..e9710ad83857 100644 --- a/mmv1/provider/terraform_tgc.go +++ b/mmv1/provider/terraform_tgc.go @@ -352,81 +352,81 @@ func (tgc TerraformGoogleConversion) CopyCommonFiles(outputFolder string, genera tgc.CopyFileList(outputFolder, retrieveTestSourceCodeWithLocation(".go")) resourceConverters := map[string]string{ - "converters/google/resources/cai/constants.go": "third_party/tgc/cai/constants.go", - "converters/google/resources/constants.go": "third_party/tgc/constants.go", - "converters/google/resources/cai.go": "third_party/tgc/cai.go", - "converters/google/resources/cai/cai.go": "third_party/tgc/cai/cai.go", - "converters/google/resources/cai/cai_test.go": "third_party/tgc/cai/cai_test.go", - "converters/google/resources/org_policy_policy.go": "third_party/tgc/org_policy_policy.go", - "converters/google/resources/getconfig.go": "third_party/tgc/getconfig.go", - "converters/google/resources/folder.go": "third_party/tgc/folder.go", - "converters/google/resources/getconfig_test.go": "third_party/tgc/getconfig_test.go", - "converters/google/resources/cai/json_map.go": "third_party/tgc/cai/json_map.go", - "converters/google/resources/project.go": "third_party/tgc/project.go", - "converters/google/resources/sql_database_instance.go": "third_party/tgc/sql_database_instance.go", - "converters/google/resources/storage_bucket.go": "third_party/tgc/storage_bucket.go", - "converters/google/resources/cloudfunctions_function.go": "third_party/tgc/cloudfunctions_function.go", - "converters/google/resources/cloudfunctions_cloud_function.go": "third_party/tgc/cloudfunctions_cloud_function.go", - "converters/google/resources/bigquery_table.go": "third_party/tgc/bigquery_table.go", - "converters/google/resources/bigtable_cluster.go": "third_party/tgc/bigtable_cluster.go", - "converters/google/resources/bigtable_instance.go": "third_party/tgc/bigtable_instance.go", - "converters/google/resources/cai/iam_helpers.go": "third_party/tgc/cai/iam_helpers.go", - "converters/google/resources/cai/iam_helpers_test.go": "third_party/tgc/cai/iam_helpers_test.go", - "converters/google/resources/services/resourcemanager/organization_iam.go": "third_party/tgc/organization_iam.go", - "converters/google/resources/services/resourcemanager/project_iam.go": "third_party/tgc/project_iam.go", - "converters/google/resources/project_organization_policy.go": "third_party/tgc/project_organization_policy.go", - "converters/google/resources/folder_organization_policy.go": "third_party/tgc/folder_organization_policy.go", - "converters/google/resources/services/resourcemanager/folder_iam.go": "third_party/tgc/folder_iam.go", - "converters/google/resources/container.go": "third_party/tgc/container.go", - "converters/google/resources/project_service.go": "third_party/tgc/project_service.go", - "converters/google/resources/services/monitoring/monitoring_slo_helper.go": "third_party/tgc/monitoring_slo_helper.go", - "converters/google/resources/service_account.go": "third_party/tgc/service_account.go", - "converters/google/resources/services/compute/image.go": "third_party/terraform/services/compute/image.go", - "converters/google/resources/services/compute/disk_type.go": "third_party/terraform/services/compute/disk_type.go", - "converters/google/resources/services/kms/kms_utils.go": "third_party/terraform/services/kms/kms_utils.go", - "converters/google/resources/services/sourcerepo/source_repo_utils.go": "third_party/terraform/services/sourcerepo/source_repo_utils.go", - "converters/google/resources/services/pubsub/pubsub_utils.go": "third_party/terraform/services/pubsub/pubsub_utils.go", - "converters/google/resources/services/resourcemanager/iam_organization.go": "third_party/terraform/services/resourcemanager/iam_organization.go", - "converters/google/resources/services/resourcemanager/iam_folder.go": "third_party/terraform/services/resourcemanager/iam_folder.go", - "converters/google/resources/services/resourcemanager/iam_project.go": "third_party/terraform/services/resourcemanager/iam_project.go", - "converters/google/resources/services/privateca/privateca_utils.go": "third_party/terraform/services/privateca/privateca_utils.go", - "converters/google/resources/services/bigquery/iam_bigquery_dataset.go": "third_party/terraform/services/bigquery/iam_bigquery_dataset.go", - "converters/google/resources/services/bigquery/bigquery_dataset_iam.go": "third_party/tgc/bigquery_dataset_iam.go", - "converters/google/resources/compute_security_policy.go": "third_party/tgc/compute_security_policy.go", - "converters/google/resources/kms_key_ring_iam.go": "third_party/tgc/kms_key_ring_iam.go", - "converters/google/resources/kms_crypto_key_iam.go": "third_party/tgc/kms_crypto_key_iam.go", - "converters/google/resources/project_iam_custom_role.go": "third_party/tgc/project_iam_custom_role.go", - "converters/google/resources/organization_iam_custom_role.go": "third_party/tgc/organization_iam_custom_role.go", - "converters/google/resources/services/pubsub/iam_pubsub_subscription.go": "third_party/terraform/services/pubsub/iam_pubsub_subscription.go", - "converters/google/resources/services/pubsub/pubsub_subscription_iam.go": "third_party/tgc/pubsub_subscription_iam.go", - "converters/google/resources/services/spanner/iam_spanner_database.go": "third_party/terraform/services/spanner/iam_spanner_database.go", - "converters/google/resources/services/spanner/spanner_database_iam.go": "third_party/tgc/spanner_database_iam.go", - "converters/google/resources/services/spanner/iam_spanner_instance.go": "third_party/terraform/services/spanner/iam_spanner_instance.go", - "converters/google/resources/services/spanner/spanner_instance_iam.go": "third_party/tgc/spanner_instance_iam.go", - "converters/google/resources/storage_bucket_iam.go": "third_party/tgc/storage_bucket_iam.go", - "converters/google/resources/organization_policy.go": "third_party/tgc/organization_policy.go", - "converters/google/resources/iam_storage_bucket.go": "third_party/tgc/iam_storage_bucket.go", - "ancestrymanager/ancestrymanager.go": "third_party/tgc/ancestrymanager/ancestrymanager.go", - "ancestrymanager/ancestrymanager_test.go": "third_party/tgc/ancestrymanager/ancestrymanager_test.go", - "ancestrymanager/ancestryutil.go": "third_party/tgc/ancestrymanager/ancestryutil.go", - "ancestrymanager/ancestryutil_test.go": "third_party/tgc/ancestrymanager/ancestryutil_test.go", - "converters/google/convert.go": "third_party/tgc/convert.go", - "converters/google/convert_test.go": "third_party/tgc/convert_test.go", - "converters/google/resources/compute_instance_group.go": "third_party/tgc/compute_instance_group.go", - "converters/google/resources/job.go": "third_party/tgc/job.go", - "converters/google/resources/service_account_key.go": "third_party/tgc/service_account_key.go", - "converters/google/resources/compute_target_pool.go": "third_party/tgc/compute_target_pool.go", - "converters/google/resources/dataproc_cluster.go": "third_party/tgc/dataproc_cluster.go", - "converters/google/resources/composer_environment.go": "third_party/tgc/composer_environment.go", - "converters/google/resources/commitment.go": "third_party/tgc/commitment.go", - "converters/google/resources/firebase_project.go": "third_party/tgc/firebase_project.go", - "converters/google/resources/appengine_application.go": "third_party/tgc/appengine_application.go", - "converters/google/resources/apikeys_key.go": "third_party/tgc/apikeys_key.go", - "converters/google/resources/logging_folder_bucket_config.go": "third_party/tgc/logging_folder_bucket_config.go", - "converters/google/resources/logging_organization_bucket_config.go": "third_party/tgc/logging_organization_bucket_config.go", - "converters/google/resources/logging_project_bucket_config.go": "third_party/tgc/logging_project_bucket_config.go", - "converters/google/resources/logging_billing_account_bucket_config.go": "third_party/tgc/logging_billing_account_bucket_config.go", - "converters/google/resources/appengine_standard_version.go": "third_party/tgc/appengine_standard_version.go", + "converters/google/resources/cai/constants.go": "third_party/tgc/cai/constants.go", + "converters/google/resources/constants.go": "third_party/tgc/constants.go", + "converters/google/resources/cai.go": "third_party/tgc/cai.go", + "converters/google/resources/cai/cai.go": "third_party/tgc/cai/cai.go", + "converters/google/resources/cai/cai_test.go": "third_party/tgc/cai/cai_test.go", + "converters/google/resources/org_policy_policy.go": "third_party/tgc/org_policy_policy.go", + "converters/google/resources/getconfig.go": "third_party/tgc/getconfig.go", + "converters/google/resources/services/resourcemanager/folder.go": "third_party/tgc/services/resourcemanager/folder.go", + "converters/google/resources/getconfig_test.go": "third_party/tgc/getconfig_test.go", + "converters/google/resources/cai/json_map.go": "third_party/tgc/cai/json_map.go", + "converters/google/resources/services/resourcemanager/project.go": "third_party/tgc/services/resourcemanager/project.go", + "converters/google/resources/services/sql/sql_database_instance.go": "third_party/tgc/services/sql/sql_database_instance.go", + "converters/google/resources/services/storage/storage_bucket.go": "third_party/tgc/services/storage/storage_bucket.go", + "converters/google/resources/services/cloudfunctions/cloudfunctions_function.go": "third_party/tgc/services/cloudfunctions/cloudfunctions_function.go", + "converters/google/resources/services/cloudfunctions/cloudfunctions_cloud_function.go": "third_party/tgc/services/cloudfunctions/cloudfunctions_cloud_function.go", + "converters/google/resources/services/bigquery/bigquery_table.go": "third_party/tgc/services/bigquery/bigquery_table.go", + "converters/google/resources/services/bigtable/bigtable_cluster.go": "third_party/tgc/services/bigtable/bigtable_cluster.go", + "converters/google/resources/services/bigtable/bigtable_instance.go": "third_party/tgc/services/bigtable/bigtable_instance.go", + "converters/google/resources/cai/iam_helpers.go": "third_party/tgc/cai/iam_helpers.go", + "converters/google/resources/cai/iam_helpers_test.go": "third_party/tgc/cai/iam_helpers_test.go", + "converters/google/resources/services/resourcemanager/organization_iam.go": "third_party/tgc/services/resourcemanager/organization_iam.go", + "converters/google/resources/services/resourcemanager/project_iam.go": "third_party/tgc/services/resourcemanager/project_iam.go", + "converters/google/resources/services/resourcemanager/project_organization_policy.go": "third_party/tgc/services/resourcemanager/project_organization_policy.go", + "converters/google/resources/services/resourcemanager/folder_organization_policy.go": "third_party/tgc/services/resourcemanager/folder_organization_policy.go", + "converters/google/resources/services/resourcemanager/folder_iam.go": "third_party/tgc/services/resourcemanager/folder_iam.go", + "converters/google/resources/services/container/container.go": "third_party/tgc/services/container/container.go", + "converters/google/resources/services/resourcemanager/project_service.go": "third_party/tgc/services/resourcemanager/project_service.go", + "converters/google/resources/services/monitoring/monitoring_slo_helper.go": "third_party/tgc/services/monitoring/monitoring_slo_helper.go", + "converters/google/resources/services/resourcemanager/service_account.go": "third_party/tgc/services/resourcemanager/service_account.go", + "converters/google/resources/services/compute/image.go": "third_party/terraform/services/compute/image.go", + "converters/google/resources/services/compute/disk_type.go": "third_party/terraform/services/compute/disk_type.go", + "converters/google/resources/services/kms/kms_utils.go": "third_party/terraform/services/kms/kms_utils.go", + "converters/google/resources/services/sourcerepo/source_repo_utils.go": "third_party/terraform/services/sourcerepo/source_repo_utils.go", + "converters/google/resources/services/pubsub/pubsub_utils.go": "third_party/terraform/services/pubsub/pubsub_utils.go", + "converters/google/resources/services/resourcemanager/iam_organization.go": "third_party/terraform/services/resourcemanager/iam_organization.go", + "converters/google/resources/services/resourcemanager/iam_folder.go": "third_party/terraform/services/resourcemanager/iam_folder.go", + "converters/google/resources/services/resourcemanager/iam_project.go": "third_party/terraform/services/resourcemanager/iam_project.go", + "converters/google/resources/services/privateca/privateca_utils.go": "third_party/terraform/services/privateca/privateca_utils.go", + "converters/google/resources/services/bigquery/iam_bigquery_dataset.go": "third_party/terraform/services/bigquery/iam_bigquery_dataset.go", + "converters/google/resources/services/bigquery/bigquery_dataset_iam.go": "third_party/tgc/services/bigquery/bigquery_dataset_iam.go", + "converters/google/resources/services/compute/compute_security_policy.go": "third_party/tgc/services/compute/compute_security_policy.go", + "converters/google/resources/services/kms/kms_key_ring_iam.go": "third_party/tgc/services/kms/kms_key_ring_iam.go", + "converters/google/resources/services/kms/kms_crypto_key_iam.go": "third_party/tgc/services/kms/kms_crypto_key_iam.go", + "converters/google/resources/services/resourcemanager/project_iam_custom_role.go": "third_party/tgc/services/resourcemanager/project_iam_custom_role.go", + "converters/google/resources/services/resourcemanager/organization_iam_custom_role.go": "third_party/tgc/services/resourcemanager/organization_iam_custom_role.go", + "converters/google/resources/services/pubsub/iam_pubsub_subscription.go": "third_party/terraform/services/pubsub/iam_pubsub_subscription.go", + "converters/google/resources/services/pubsub/pubsub_subscription_iam.go": "third_party/tgc/services/pubsub/pubsub_subscription_iam.go", + "converters/google/resources/services/spanner/iam_spanner_database.go": "third_party/terraform/services/spanner/iam_spanner_database.go", + "converters/google/resources/services/spanner/spanner_database_iam.go": "third_party/tgc/services/spanner/spanner_database_iam.go", + "converters/google/resources/services/spanner/iam_spanner_instance.go": "third_party/terraform/services/spanner/iam_spanner_instance.go", + "converters/google/resources/services/spanner/spanner_instance_iam.go": "third_party/tgc/services/spanner/spanner_instance_iam.go", + "converters/google/resources/services/storage/storage_bucket_iam.go": "third_party/tgc/services/storage/storage_bucket_iam.go", + "converters/google/resources/services/resourcemanager/organization_policy.go": "third_party/tgc/services/resourcemanager/organization_policy.go", + "converters/google/resources/services/storage/iam_storage_bucket.go": "third_party/tgc/services/storage/iam_storage_bucket.go", + "ancestrymanager/ancestrymanager.go": "third_party/tgc/ancestrymanager/ancestrymanager.go", + "ancestrymanager/ancestrymanager_test.go": "third_party/tgc/ancestrymanager/ancestrymanager_test.go", + "ancestrymanager/ancestryutil.go": "third_party/tgc/ancestrymanager/ancestryutil.go", + "ancestrymanager/ancestryutil_test.go": "third_party/tgc/ancestrymanager/ancestryutil_test.go", + "converters/google/convert.go": "third_party/tgc/convert.go", + "converters/google/convert_test.go": "third_party/tgc/convert_test.go", + "converters/google/resources/services/compute/compute_instance_group.go": "third_party/tgc/services/compute/compute_instance_group.go", + "converters/google/resources/services/dataflow/job.go": "third_party/tgc/services/dataflow/job.go", + "converters/google/resources/services/resourcemanager/service_account_key.go": "third_party/tgc/services/resourcemanager/service_account_key.go", + "converters/google/resources/services/compute/compute_target_pool.go": "third_party/tgc/services/compute/compute_target_pool.go", + "converters/google/resources/services/dataproc/dataproc_cluster.go": "third_party/tgc/services/dataproc/dataproc_cluster.go", + "converters/google/resources/services/composer/composer_environment.go": "third_party/tgc/services/composer/composer_environment.go", + "converters/google/resources/services/compute/commitment.go": "third_party/tgc/services/compute/commitment.go", + "converters/google/resources/services/firebase/firebase_project.go": "third_party/tgc/services/firebase/firebase_project.go", + "converters/google/resources/services/appengine/appengine_application.go": "third_party/tgc/services/appengine/appengine_application.go", + "converters/google/resources/services/apikeys/apikeys_key.go": "third_party/tgc/services/apikeys/apikeys_key.go", + "converters/google/resources/services/logging/logging_folder_bucket_config.go": "third_party/tgc/services/logging/logging_folder_bucket_config.go", + "converters/google/resources/services/logging/logging_organization_bucket_config.go": "third_party/tgc/services/logging/logging_organization_bucket_config.go", + "converters/google/resources/services/logging/logging_project_bucket_config.go": "third_party/tgc/services/logging/logging_project_bucket_config.go", + "converters/google/resources/services/logging/logging_billing_account_bucket_config.go": "third_party/tgc/services/logging/logging_billing_account_bucket_config.go", + "converters/google/resources/services/appengine/appengine_standard_version.go": "third_party/tgc/services/appengine/appengine_standard_version.go", } tgc.CopyFileList(outputFolder, resourceConverters) } diff --git a/mmv1/third_party/tgc/iam_helpers.go b/mmv1/third_party/tgc/iam_helpers.go deleted file mode 100644 index 918f0fff186d..000000000000 --- a/mmv1/third_party/tgc/iam_helpers.go +++ /dev/null @@ -1,87 +0,0 @@ -package google - -import ( - "github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai" - "github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgiamresource" - "github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgresource" - transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport" -) - -// ExpandIamPolicyBindings is used in google__iam_policy resources. -func expandIamPolicyBindings(d tpgresource.TerraformResourceData) ([]cai.IAMBinding, error) { - return cai.ExpandIamPolicyBindings(d) -} - -// ExpandIamRoleBindings is used in google__iam_binding resources. -func expandIamRoleBindings(d tpgresource.TerraformResourceData) ([]cai.IAMBinding, error) { - return cai.ExpandIamRoleBindings(d) -} - -// ExpandIamMemberBindings is used in google__iam_member resources. -func expandIamMemberBindings(d tpgresource.TerraformResourceData) ([]cai.IAMBinding, error) { - return cai.ExpandIamMemberBindings(d) -} - -// MergeIamAssets merges an existing asset with the IAM bindings of an incoming -// cai.Asset. -func mergeIamAssets( - existing, incoming cai.Asset, - MergeBindings func(existing, incoming []cai.IAMBinding) []cai.IAMBinding, -) cai.Asset { - return cai.MergeIamAssets( - existing, incoming, - MergeBindings, - ) -} - -// incoming is the last known state of an asset prior to deletion -func mergeDeleteIamAssets( - existing, incoming cai.Asset, - MergeBindings func(existing, incoming []cai.IAMBinding) []cai.IAMBinding, -) cai.Asset { - return cai.MergeDeleteIamAssets( - existing, incoming, - MergeBindings, - ) -} - -// MergeAdditiveBindings adds members to bindings with the same roles and adds new -// bindings for roles that dont exist. -func mergeAdditiveBindings(existing, incoming []cai.IAMBinding) []cai.IAMBinding { - return cai.MergeAdditiveBindings(existing, incoming) -} - -// MergeDeleteAdditiveBindings eliminates listed members from roles in the -// existing list. incoming is the last known state of the bindings being deleted. -func mergeDeleteAdditiveBindings(existing, incoming []cai.IAMBinding) []cai.IAMBinding { - return cai.MergeDeleteAdditiveBindings(existing, incoming) -} - -// MergeAuthoritativeBindings clobbers members to bindings with the same roles -// and adds new bindings for roles that dont exist. -func mergeAuthoritativeBindings(existing, incoming []cai.IAMBinding) []cai.IAMBinding { - return cai.MergeAuthoritativeBindings(existing, incoming) -} - -// MergeDeleteAuthoritativeBindings eliminates any bindings with matching roles -// in the existing list. incoming is the last known state of the bindings being -// deleted. -func mergeDeleteAuthoritativeBindings(existing, incoming []cai.IAMBinding) []cai.IAMBinding { - return cai.MergeDeleteAuthoritativeBindings(existing, incoming) -} - -func fetchIamPolicy( - newUpdaterFunc tpgiamresource.NewResourceIamUpdaterFunc, - d tpgresource.TerraformResourceData, - config *transport_tpg.Config, - assetNameTmpl string, - assetType string, -) (cai.Asset, error) { - return cai.FetchIamPolicy( - newUpdaterFunc, - d, - config, - assetNameTmpl, - assetType, - ) -} diff --git a/mmv1/third_party/tgc/apikeys_key.go b/mmv1/third_party/tgc/services/apikeys/apikeys_key.go similarity index 99% rename from mmv1/third_party/tgc/apikeys_key.go rename to mmv1/third_party/tgc/services/apikeys/apikeys_key.go index 33fbb101640d..d1cf193fdff0 100644 --- a/mmv1/third_party/tgc/apikeys_key.go +++ b/mmv1/third_party/tgc/services/apikeys/apikeys_key.go @@ -1,4 +1,4 @@ -package google +package apikeys import ( "reflect" @@ -125,7 +125,7 @@ func expandApikeysKeyDeleteTime(v interface{}, d tpgresource.TerraformResourceDa } func expandApikeysKeyRestrictions(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - + l := v.([]interface{}) if len(l) == 0 || l[0] == nil { return nil, nil @@ -203,7 +203,6 @@ func expandApikeysKeySha1Fingerprint(v interface{}, d tpgresource.TerraformResou return v, nil } - func expandApikeysKeyApiTargets(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { l := v.([]interface{}) if len(l) == 0 || l[0] == nil { @@ -238,7 +237,6 @@ func expandApikeysKeyMethods(v interface{}, d tpgresource.TerraformResourceData, return convertInterfaceToStringArray(v.([]interface{})), nil } - func expandApikeysKeyDEtag(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/mmv1/third_party/tgc/appengine_application.go b/mmv1/third_party/tgc/services/appengine/appengine_application.go similarity index 99% rename from mmv1/third_party/tgc/appengine_application.go rename to mmv1/third_party/tgc/services/appengine/appengine_application.go index c64f8db8cc98..34610c555d37 100644 --- a/mmv1/third_party/tgc/appengine_application.go +++ b/mmv1/third_party/tgc/services/appengine/appengine_application.go @@ -1,4 +1,4 @@ -package google +package appengine import ( "reflect" @@ -55,7 +55,6 @@ func GetAppEngineApplicationApiObject(d tpgresource.TerraformResourceData, confi obj["location_id"] = locationIdProp } - return obj, nil } @@ -63,7 +62,6 @@ func expandAppEngineApplicationId(v interface{}, d tpgresource.TerraformResource return v, nil } - func expandAppEngineApplicationLocationId(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/mmv1/third_party/tgc/appengine_standard_version.go b/mmv1/third_party/tgc/services/appengine/appengine_standard_version.go similarity index 99% rename from mmv1/third_party/tgc/appengine_standard_version.go rename to mmv1/third_party/tgc/services/appengine/appengine_standard_version.go index a86bfb70e97d..d91467f6df01 100644 --- a/mmv1/third_party/tgc/appengine_standard_version.go +++ b/mmv1/third_party/tgc/services/appengine/appengine_standard_version.go @@ -1,4 +1,4 @@ -package google +package appengine import ( "reflect" diff --git a/mmv1/third_party/tgc/bigquery_table.go b/mmv1/third_party/tgc/services/bigquery/bigquery_table.go similarity index 99% rename from mmv1/third_party/tgc/bigquery_table.go rename to mmv1/third_party/tgc/services/bigquery/bigquery_table.go index 20ede57cc956..2a26fd1861bc 100644 --- a/mmv1/third_party/tgc/bigquery_table.go +++ b/mmv1/third_party/tgc/services/bigquery/bigquery_table.go @@ -1,4 +1,4 @@ -package google +package bigquery import ( "reflect" diff --git a/mmv1/third_party/tgc/bigtable_cluster.go b/mmv1/third_party/tgc/services/bigtable/bigtable_cluster.go similarity index 99% rename from mmv1/third_party/tgc/bigtable_cluster.go rename to mmv1/third_party/tgc/services/bigtable/bigtable_cluster.go index 99ce6e523b4b..686f26bfcb42 100644 --- a/mmv1/third_party/tgc/bigtable_cluster.go +++ b/mmv1/third_party/tgc/services/bigtable/bigtable_cluster.go @@ -1,4 +1,4 @@ -package google +package bigtable import ( "reflect" diff --git a/mmv1/third_party/tgc/bigtable_instance.go b/mmv1/third_party/tgc/services/bigtable/bigtable_instance.go similarity index 99% rename from mmv1/third_party/tgc/bigtable_instance.go rename to mmv1/third_party/tgc/services/bigtable/bigtable_instance.go index 6403eb378c23..48d792429975 100644 --- a/mmv1/third_party/tgc/bigtable_instance.go +++ b/mmv1/third_party/tgc/services/bigtable/bigtable_instance.go @@ -1,4 +1,4 @@ -package google +package bigtable import ( "reflect" diff --git a/mmv1/third_party/tgc/cloudfunctions_cloud_function.go b/mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_cloud_function.go similarity index 99% rename from mmv1/third_party/tgc/cloudfunctions_cloud_function.go rename to mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_cloud_function.go index 7e5fb205cfc8..3d6f125a3e47 100644 --- a/mmv1/third_party/tgc/cloudfunctions_cloud_function.go +++ b/mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_cloud_function.go @@ -1,4 +1,4 @@ -package google +package cloudfunctions import ( "reflect" diff --git a/mmv1/third_party/tgc/cloudfunctions_function.go b/mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_function.go similarity index 99% rename from mmv1/third_party/tgc/cloudfunctions_function.go rename to mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_function.go index 1f1d917d2739..2ffb16e1d08f 100644 --- a/mmv1/third_party/tgc/cloudfunctions_function.go +++ b/mmv1/third_party/tgc/services/cloudfunctions/cloudfunctions_function.go @@ -1,4 +1,4 @@ -package google +package cloudfunctions import ( "reflect" diff --git a/mmv1/third_party/tgc/composer_environment.go b/mmv1/third_party/tgc/services/composer/composer_environment.go similarity index 99% rename from mmv1/third_party/tgc/composer_environment.go rename to mmv1/third_party/tgc/services/composer/composer_environment.go index fff555854d56..00321f51c0ce 100644 --- a/mmv1/third_party/tgc/composer_environment.go +++ b/mmv1/third_party/tgc/services/composer/composer_environment.go @@ -1,4 +1,4 @@ -package google +package composer import ( "reflect" diff --git a/mmv1/third_party/tgc/commitment.go b/mmv1/third_party/tgc/services/compute/commitment.go similarity index 99% rename from mmv1/third_party/tgc/commitment.go rename to mmv1/third_party/tgc/services/compute/commitment.go index 26bb7d47de5d..0ce9c318f4ac 100644 --- a/mmv1/third_party/tgc/commitment.go +++ b/mmv1/third_party/tgc/services/compute/commitment.go @@ -1,4 +1,4 @@ -package google +package compute import ( "reflect" @@ -152,14 +152,14 @@ func GetCommitmentApiObject(d tpgresource.TerraformResourceData, config *transpo } else if v, ok := d.GetOkExists("start_timestamp"); !tpgresource.IsEmptyValue(reflect.ValueOf(statusMessageProp)) && (ok || !reflect.DeepEqual(v, statusMessageProp)) { obj["startTimestamp"] = startTimestampProp } - + endTimestampProp, err := expandCommitmentEndTimestamp(d.Get("end_timestamp"), d, config) if err != nil { return nil, err } else if v, ok := d.GetOkExists("end_timestamp"); !tpgresource.IsEmptyValue(reflect.ValueOf(endTimestampProp)) && (ok || !reflect.DeepEqual(v, endTimestampProp)) { obj["endTimestamp"] = endTimestampProp } - + selfLinkProp, err := expandCommitmentSelfLink(d.Get("self_link"), d, config) if err != nil { return nil, err @@ -323,4 +323,4 @@ func expandCommitmentPlan(v interface{}, d tpgresource.TerraformResourceData, co func expandCommitmentName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil -} \ No newline at end of file +} diff --git a/mmv1/third_party/tgc/compute_instance.go.tmpl b/mmv1/third_party/tgc/services/compute/compute_instance.go.tmpl similarity index 100% rename from mmv1/third_party/tgc/compute_instance.go.tmpl rename to mmv1/third_party/tgc/services/compute/compute_instance.go.tmpl diff --git a/mmv1/third_party/tgc/compute_instance_group.go b/mmv1/third_party/tgc/services/compute/compute_instance_group.go similarity index 99% rename from mmv1/third_party/tgc/compute_instance_group.go rename to mmv1/third_party/tgc/services/compute/compute_instance_group.go index a7916bc32832..fa2df03a8639 100644 --- a/mmv1/third_party/tgc/compute_instance_group.go +++ b/mmv1/third_party/tgc/services/compute/compute_instance_group.go @@ -1,4 +1,4 @@ -package google +package compute import ( "reflect" @@ -80,7 +80,7 @@ func GetComputeInstanceGroupApiObject(d tpgresource.TerraformResourceData, confi } url = url + zoneProp.(string) - obj["zone"] = url + obj["zone"] = url } selfLinkProp, err := expandComputeInstanceGroupSelfLink(d.Get("self_link"), d, config) if err != nil { @@ -152,4 +152,4 @@ func expandComputeInstanceGroupRegion(v interface{}, d tpgresource.TerraformReso func expandComputeInstanceGroupSubnetwork(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil -} \ No newline at end of file +} diff --git a/mmv1/third_party/tgc/compute_security_policy.go b/mmv1/third_party/tgc/services/compute/compute_security_policy.go similarity index 99% rename from mmv1/third_party/tgc/compute_security_policy.go rename to mmv1/third_party/tgc/services/compute/compute_security_policy.go index 7107d175c41f..a1b60dedf516 100644 --- a/mmv1/third_party/tgc/compute_security_policy.go +++ b/mmv1/third_party/tgc/services/compute/compute_security_policy.go @@ -1,4 +1,4 @@ -package google +package compute import ( "reflect" diff --git a/mmv1/third_party/tgc/compute_target_pool.go b/mmv1/third_party/tgc/services/compute/compute_target_pool.go similarity index 99% rename from mmv1/third_party/tgc/compute_target_pool.go rename to mmv1/third_party/tgc/services/compute/compute_target_pool.go index 60a5e28b8a8a..9c85d1642d19 100644 --- a/mmv1/third_party/tgc/compute_target_pool.go +++ b/mmv1/third_party/tgc/services/compute/compute_target_pool.go @@ -1,4 +1,4 @@ -package google +package compute import ( "reflect" diff --git a/mmv1/third_party/tgc/container.go b/mmv1/third_party/tgc/services/container/container.go similarity index 99% rename from mmv1/third_party/tgc/container.go rename to mmv1/third_party/tgc/services/container/container.go index 4c7caa378740..454e4c47f984 100644 --- a/mmv1/third_party/tgc/container.go +++ b/mmv1/third_party/tgc/services/container/container.go @@ -4,7 +4,7 @@ // see https://github.com/GoogleCloudPlatform/magic-modules/pull/2485#issuecomment-545680059 // for the discussion. -package google +package container import ( "fmt" diff --git a/mmv1/third_party/tgc/job.go b/mmv1/third_party/tgc/services/dataflow/job.go similarity index 99% rename from mmv1/third_party/tgc/job.go rename to mmv1/third_party/tgc/services/dataflow/job.go index 94cac92463cd..4c52dc76c92f 100644 --- a/mmv1/third_party/tgc/job.go +++ b/mmv1/third_party/tgc/services/dataflow/job.go @@ -1,4 +1,4 @@ -package google +package dataflow import ( "reflect" @@ -302,4 +302,4 @@ func expandDataflowRuntimeUpdatableParams(v interface{}, d tpgresource.Terraform func expandDataflowSatisfiesPzi(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil -} \ No newline at end of file +} diff --git a/mmv1/third_party/tgc/dataproc_cluster.go b/mmv1/third_party/tgc/services/dataproc/dataproc_cluster.go similarity index 99% rename from mmv1/third_party/tgc/dataproc_cluster.go rename to mmv1/third_party/tgc/services/dataproc/dataproc_cluster.go index e33b8134617a..31aa88674ad2 100644 --- a/mmv1/third_party/tgc/dataproc_cluster.go +++ b/mmv1/third_party/tgc/services/dataproc/dataproc_cluster.go @@ -1,4 +1,4 @@ -package google +package dataproc import ( "reflect" diff --git a/mmv1/third_party/tgc/firebase_project.go b/mmv1/third_party/tgc/services/firebase/firebase_project.go similarity index 99% rename from mmv1/third_party/tgc/firebase_project.go rename to mmv1/third_party/tgc/services/firebase/firebase_project.go index 28b469278020..97e732ac19c0 100644 --- a/mmv1/third_party/tgc/firebase_project.go +++ b/mmv1/third_party/tgc/services/firebase/firebase_project.go @@ -1,4 +1,4 @@ -package google +package firebase import ( "reflect" @@ -40,7 +40,7 @@ func GetFirebaseProjectCaiObject(d tpgresource.TerraformResourceData, config *tr func GetFirebaseProjectApiObject(d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) { obj := make(map[string]interface{}) - + nameProp, err := expandFirebaseProjectName(d.Get("name"), d, config) if err != nil { return nil, err @@ -102,4 +102,4 @@ func expandFirebaseProjectProjectId(v interface{}, d tpgresource.TerraformResour func expandFirebaseProjectName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil -} \ No newline at end of file +} diff --git a/mmv1/third_party/tgc/kms_crypto_key_iam.go b/mmv1/third_party/tgc/services/kms/kms_crypto_key_iam.go similarity index 99% rename from mmv1/third_party/tgc/kms_crypto_key_iam.go rename to mmv1/third_party/tgc/services/kms/kms_crypto_key_iam.go index 201cef86cfc5..48dbcb0366b0 100644 --- a/mmv1/third_party/tgc/kms_crypto_key_iam.go +++ b/mmv1/third_party/tgc/services/kms/kms_crypto_key_iam.go @@ -1,4 +1,4 @@ -package google +package kms import ( "fmt" diff --git a/mmv1/third_party/tgc/kms_key_ring_iam.go b/mmv1/third_party/tgc/services/kms/kms_key_ring_iam.go similarity index 99% rename from mmv1/third_party/tgc/kms_key_ring_iam.go rename to mmv1/third_party/tgc/services/kms/kms_key_ring_iam.go index 57404f81445c..214aecb189e4 100644 --- a/mmv1/third_party/tgc/kms_key_ring_iam.go +++ b/mmv1/third_party/tgc/services/kms/kms_key_ring_iam.go @@ -1,4 +1,4 @@ -package google +package kms import ( "fmt" diff --git a/mmv1/third_party/tgc/logging_billing_account_bucket_config.go b/mmv1/third_party/tgc/services/logging/logging_billing_account_bucket_config.go similarity index 99% rename from mmv1/third_party/tgc/logging_billing_account_bucket_config.go rename to mmv1/third_party/tgc/services/logging/logging_billing_account_bucket_config.go index 741e11a59bb5..09c19d740797 100644 --- a/mmv1/third_party/tgc/logging_billing_account_bucket_config.go +++ b/mmv1/third_party/tgc/services/logging/logging_billing_account_bucket_config.go @@ -1,4 +1,4 @@ -package google +package logging import ( "reflect" diff --git a/mmv1/third_party/tgc/logging_folder_bucket_config.go b/mmv1/third_party/tgc/services/logging/logging_folder_bucket_config.go similarity index 99% rename from mmv1/third_party/tgc/logging_folder_bucket_config.go rename to mmv1/third_party/tgc/services/logging/logging_folder_bucket_config.go index 564fc2555c9c..57763b71021e 100644 --- a/mmv1/third_party/tgc/logging_folder_bucket_config.go +++ b/mmv1/third_party/tgc/services/logging/logging_folder_bucket_config.go @@ -1,4 +1,4 @@ -package google +package logging import ( "reflect" diff --git a/mmv1/third_party/tgc/logging_organization_bucket_config.go b/mmv1/third_party/tgc/services/logging/logging_organization_bucket_config.go similarity index 99% rename from mmv1/third_party/tgc/logging_organization_bucket_config.go rename to mmv1/third_party/tgc/services/logging/logging_organization_bucket_config.go index c617d961665d..87060b8a0625 100644 --- a/mmv1/third_party/tgc/logging_organization_bucket_config.go +++ b/mmv1/third_party/tgc/services/logging/logging_organization_bucket_config.go @@ -1,4 +1,4 @@ -package google +package logging import ( "reflect" diff --git a/mmv1/third_party/tgc/logging_project_bucket_config.go b/mmv1/third_party/tgc/services/logging/logging_project_bucket_config.go similarity index 99% rename from mmv1/third_party/tgc/logging_project_bucket_config.go rename to mmv1/third_party/tgc/services/logging/logging_project_bucket_config.go index 77e96884a679..2706c34de33f 100644 --- a/mmv1/third_party/tgc/logging_project_bucket_config.go +++ b/mmv1/third_party/tgc/services/logging/logging_project_bucket_config.go @@ -1,4 +1,4 @@ -package google +package logging import ( "reflect" diff --git a/mmv1/third_party/tgc/monitoring_slo_helper.go b/mmv1/third_party/tgc/services/monitoring/monitoring_slo_helper.go similarity index 100% rename from mmv1/third_party/tgc/monitoring_slo_helper.go rename to mmv1/third_party/tgc/services/monitoring/monitoring_slo_helper.go diff --git a/mmv1/third_party/tgc/pubsub_subscription_iam.go b/mmv1/third_party/tgc/services/pubsub/pubsub_subscription_iam.go similarity index 100% rename from mmv1/third_party/tgc/pubsub_subscription_iam.go rename to mmv1/third_party/tgc/services/pubsub/pubsub_subscription_iam.go diff --git a/mmv1/third_party/tgc/folder.go b/mmv1/third_party/tgc/services/resourcemanager/folder.go similarity index 98% rename from mmv1/third_party/tgc/folder.go rename to mmv1/third_party/tgc/services/resourcemanager/folder.go index cdcf1b5644ba..e4ce037f9dc9 100644 --- a/mmv1/third_party/tgc/folder.go +++ b/mmv1/third_party/tgc/services/resourcemanager/folder.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "time" diff --git a/mmv1/third_party/tgc/folder_iam.go b/mmv1/third_party/tgc/services/resourcemanager/folder_iam.go similarity index 100% rename from mmv1/third_party/tgc/folder_iam.go rename to mmv1/third_party/tgc/services/resourcemanager/folder_iam.go diff --git a/mmv1/third_party/tgc/folder_organization_policy.go b/mmv1/third_party/tgc/services/resourcemanager/folder_organization_policy.go similarity index 98% rename from mmv1/third_party/tgc/folder_organization_policy.go rename to mmv1/third_party/tgc/services/resourcemanager/folder_organization_policy.go index 275743e35f47..a41edfe91119 100644 --- a/mmv1/third_party/tgc/folder_organization_policy.go +++ b/mmv1/third_party/tgc/services/resourcemanager/folder_organization_policy.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai" diff --git a/mmv1/third_party/tgc/org_policy_policy.go b/mmv1/third_party/tgc/services/resourcemanager/org_policy_policy.go similarity index 99% rename from mmv1/third_party/tgc/org_policy_policy.go rename to mmv1/third_party/tgc/services/resourcemanager/org_policy_policy.go index bf14d9a52050..1a10797f8ee1 100644 --- a/mmv1/third_party/tgc/org_policy_policy.go +++ b/mmv1/third_party/tgc/services/resourcemanager/org_policy_policy.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "fmt" diff --git a/mmv1/third_party/tgc/organization_iam.go b/mmv1/third_party/tgc/services/resourcemanager/organization_iam.go similarity index 100% rename from mmv1/third_party/tgc/organization_iam.go rename to mmv1/third_party/tgc/services/resourcemanager/organization_iam.go diff --git a/mmv1/third_party/tgc/organization_iam_custom_role.go b/mmv1/third_party/tgc/services/resourcemanager/organization_iam_custom_role.go similarity index 99% rename from mmv1/third_party/tgc/organization_iam_custom_role.go rename to mmv1/third_party/tgc/services/resourcemanager/organization_iam_custom_role.go index 439975955708..30041a60a27c 100644 --- a/mmv1/third_party/tgc/organization_iam_custom_role.go +++ b/mmv1/third_party/tgc/services/resourcemanager/organization_iam_custom_role.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "reflect" diff --git a/mmv1/third_party/tgc/organization_policy.go b/mmv1/third_party/tgc/services/resourcemanager/organization_policy.go similarity index 98% rename from mmv1/third_party/tgc/organization_policy.go rename to mmv1/third_party/tgc/services/resourcemanager/organization_policy.go index 123689001755..daa2e1d16ba5 100644 --- a/mmv1/third_party/tgc/organization_policy.go +++ b/mmv1/third_party/tgc/services/resourcemanager/organization_policy.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "github.com/GoogleCloudPlatform/terraform-google-conversion/v5/tfplan2cai/converters/google/resources/cai" diff --git a/mmv1/third_party/tgc/project.go b/mmv1/third_party/tgc/services/resourcemanager/project.go similarity index 99% rename from mmv1/third_party/tgc/project.go rename to mmv1/third_party/tgc/services/resourcemanager/project.go index 9f33a8a95d8d..dc51f67f5cc2 100644 --- a/mmv1/third_party/tgc/project.go +++ b/mmv1/third_party/tgc/services/resourcemanager/project.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "fmt" diff --git a/mmv1/third_party/tgc/project_iam.go b/mmv1/third_party/tgc/services/resourcemanager/project_iam.go similarity index 100% rename from mmv1/third_party/tgc/project_iam.go rename to mmv1/third_party/tgc/services/resourcemanager/project_iam.go diff --git a/mmv1/third_party/tgc/project_iam_custom_role.go b/mmv1/third_party/tgc/services/resourcemanager/project_iam_custom_role.go similarity index 99% rename from mmv1/third_party/tgc/project_iam_custom_role.go rename to mmv1/third_party/tgc/services/resourcemanager/project_iam_custom_role.go index e16bbcc15dc7..5507d202fb91 100644 --- a/mmv1/third_party/tgc/project_iam_custom_role.go +++ b/mmv1/third_party/tgc/services/resourcemanager/project_iam_custom_role.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "reflect" diff --git a/mmv1/third_party/tgc/project_organization_policy.go b/mmv1/third_party/tgc/services/resourcemanager/project_organization_policy.go similarity index 99% rename from mmv1/third_party/tgc/project_organization_policy.go rename to mmv1/third_party/tgc/services/resourcemanager/project_organization_policy.go index 16a9b73f7568..b0cf3b1b3215 100644 --- a/mmv1/third_party/tgc/project_organization_policy.go +++ b/mmv1/third_party/tgc/services/resourcemanager/project_organization_policy.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "fmt" diff --git a/mmv1/third_party/tgc/project_service.go b/mmv1/third_party/tgc/services/resourcemanager/project_service.go similarity index 99% rename from mmv1/third_party/tgc/project_service.go rename to mmv1/third_party/tgc/services/resourcemanager/project_service.go index 50eeae0ba462..970702befac2 100644 --- a/mmv1/third_party/tgc/project_service.go +++ b/mmv1/third_party/tgc/services/resourcemanager/project_service.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "fmt" diff --git a/mmv1/third_party/tgc/project_service_test.go b/mmv1/third_party/tgc/services/resourcemanager/project_service_test.go similarity index 99% rename from mmv1/third_party/tgc/project_service_test.go rename to mmv1/third_party/tgc/services/resourcemanager/project_service_test.go index 0b4e9957ae53..4b87b25f78eb 100644 --- a/mmv1/third_party/tgc/project_service_test.go +++ b/mmv1/third_party/tgc/services/resourcemanager/project_service_test.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "testing" diff --git a/mmv1/third_party/tgc/service_account.go b/mmv1/third_party/tgc/services/resourcemanager/service_account.go similarity index 99% rename from mmv1/third_party/tgc/service_account.go rename to mmv1/third_party/tgc/services/resourcemanager/service_account.go index b9cc14038515..5bc970b73350 100644 --- a/mmv1/third_party/tgc/service_account.go +++ b/mmv1/third_party/tgc/services/resourcemanager/service_account.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "fmt" diff --git a/mmv1/third_party/tgc/service_account_key.go b/mmv1/third_party/tgc/services/resourcemanager/service_account_key.go similarity index 99% rename from mmv1/third_party/tgc/service_account_key.go rename to mmv1/third_party/tgc/services/resourcemanager/service_account_key.go index c62b3b14f8a3..53fba65a49c1 100644 --- a/mmv1/third_party/tgc/service_account_key.go +++ b/mmv1/third_party/tgc/services/resourcemanager/service_account_key.go @@ -1,4 +1,4 @@ -package google +package resourcemanager import ( "reflect" diff --git a/mmv1/third_party/tgc/spanner_database_iam.go b/mmv1/third_party/tgc/services/spanner/spanner_database_iam.go similarity index 100% rename from mmv1/third_party/tgc/spanner_database_iam.go rename to mmv1/third_party/tgc/services/spanner/spanner_database_iam.go diff --git a/mmv1/third_party/tgc/spanner_instance_iam.go b/mmv1/third_party/tgc/services/spanner/spanner_instance_iam.go similarity index 100% rename from mmv1/third_party/tgc/spanner_instance_iam.go rename to mmv1/third_party/tgc/services/spanner/spanner_instance_iam.go diff --git a/mmv1/third_party/tgc/sql_database_instance.go b/mmv1/third_party/tgc/services/sql/sql_database_instance.go similarity index 99% rename from mmv1/third_party/tgc/sql_database_instance.go rename to mmv1/third_party/tgc/services/sql/sql_database_instance.go index 3903b31f2c98..13af9f726ea0 100644 --- a/mmv1/third_party/tgc/sql_database_instance.go +++ b/mmv1/third_party/tgc/services/sql/sql_database_instance.go @@ -6,7 +6,7 @@ // third_party/terraform/resources/resource_sql_database_instance.go.erb.go // // ---------------------------------------------------------------------------- -package google +package sql import ( "regexp" diff --git a/mmv1/third_party/tgc/iam_storage_bucket.go b/mmv1/third_party/tgc/services/storage/iam_storage_bucket.go similarity index 99% rename from mmv1/third_party/tgc/iam_storage_bucket.go rename to mmv1/third_party/tgc/services/storage/iam_storage_bucket.go index 44b1ce92a569..57258ff0466d 100644 --- a/mmv1/third_party/tgc/iam_storage_bucket.go +++ b/mmv1/third_party/tgc/services/storage/iam_storage_bucket.go @@ -1,4 +1,4 @@ -package google +package storage import ( "fmt" diff --git a/mmv1/third_party/tgc/storage_bucket.go b/mmv1/third_party/tgc/services/storage/storage_bucket.go similarity index 99% rename from mmv1/third_party/tgc/storage_bucket.go rename to mmv1/third_party/tgc/services/storage/storage_bucket.go index 1bacf205a812..9ba52b00375f 100644 --- a/mmv1/third_party/tgc/storage_bucket.go +++ b/mmv1/third_party/tgc/services/storage/storage_bucket.go @@ -6,7 +6,7 @@ // third_party/terraform/resources/resource_storage_bucket.go // // ---------------------------------------------------------------------------- -package google +package storage import ( "fmt" diff --git a/mmv1/third_party/tgc/storage_bucket_iam.go b/mmv1/third_party/tgc/services/storage/storage_bucket_iam.go similarity index 99% rename from mmv1/third_party/tgc/storage_bucket_iam.go rename to mmv1/third_party/tgc/services/storage/storage_bucket_iam.go index f88e54c5d908..38222d6f7f4f 100644 --- a/mmv1/third_party/tgc/storage_bucket_iam.go +++ b/mmv1/third_party/tgc/services/storage/storage_bucket_iam.go @@ -1,4 +1,4 @@ -package google +package storage import ( "fmt"