From 373da438ce42f4d2de1ad01c57f39f1faeafac74 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 27 Aug 2021 12:28:57 -0500 Subject: [PATCH] Add partition in `provider.go` resource declarations for tpgtool generated resources (#5148) (#3572) Signed-off-by: Modular Magician --- .changelog/5148.txt | 3 +++ google-beta/provider.go | 24 +++++++++++-------- google-beta/resource_dataproc_cluster_test.go | 3 ++- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 .changelog/5148.txt diff --git a/.changelog/5148.txt b/.changelog/5148.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/5148.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/provider.go b/google-beta/provider.go index e00b862b7e..1ac4700b2e 100644 --- a/google-beta/provider.go +++ b/google-beta/provider.go @@ -1258,20 +1258,15 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) { "google_workflows_workflow": resourceWorkflowsWorkflow(), }, map[string]*schema.Resource{ - "google_assured_workloads_workload": resourceAssuredWorkloadsWorkload(), "google_app_engine_application": resourceAppEngineApplication(), "google_bigquery_table": resourceBigQueryTable(), "google_bigtable_gc_policy": resourceBigtableGCPolicy(), "google_bigtable_instance": resourceBigtableInstance(), "google_bigtable_table": resourceBigtableTable(), "google_billing_subaccount": resourceBillingSubaccount(), - "google_cloudbuild_worker_pool": resourceCloudbuildWorkerPool(), "google_cloudfunctions_function": resourceCloudFunctionsFunction(), "google_composer_environment": resourceComposerEnvironment(), "google_compute_attached_disk": resourceComputeAttachedDisk(), - "google_compute_firewall_policy_association": resourceComputeFirewallPolicyAssociation(), - "google_compute_firewall_policy": resourceComputeFirewallPolicy(), - "google_compute_firewall_policy_rule": resourceComputeFirewallPolicyRule(), "google_compute_instance": resourceComputeInstance(), "google_compute_instance_from_machine_image": resourceComputeInstanceFromMachineImage(), "google_compute_instance_from_template": resourceComputeInstanceFromTemplate(), @@ -1295,14 +1290,9 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) { "google_dataflow_flex_template_job": resourceDataflowFlexTemplateJob(), "google_dataproc_cluster": resourceDataprocCluster(), "google_dataproc_job": resourceDataprocJob(), - "google_dataproc_workflow_template": resourceDataprocWorkflowTemplate(), "google_endpoints_service": resourceEndpointsService(), - "google_eventarc_trigger": resourceEventarcTrigger(), "google_folder": resourceGoogleFolder(), "google_folder_organization_policy": resourceGoogleFolderOrganizationPolicy(), - "google_privateca_certificate_template": resourcePrivatecaCertificateTemplate(), - "google_gke_hub_feature": resourceGkeHubFeature(), - "google_gke_hub_feature_membership": resourceGkeHubFeatureMembership(), "google_logging_billing_account_sink": resourceLoggingBillingAccountSink(), "google_logging_billing_account_exclusion": ResourceLoggingExclusion(BillingAccountLoggingExclusionSchema, NewBillingAccountLoggingExclusionUpdater, billingAccountLoggingExclusionIdParseFunc), "google_logging_billing_account_bucket_config": ResourceLoggingBillingAccountBucketConfig(), @@ -1341,6 +1331,20 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) { "google_storage_notification": resourceStorageNotification(), "google_storage_transfer_job": resourceStorageTransferJob(), }, + // resources implemented within tpgtools + map[string]*schema.Resource{ + "google_assured_workloads_workload": resourceAssuredWorkloadsWorkload(), + "google_cloudbuild_worker_pool": resourceCloudbuildWorkerPool(), + "google_compute_firewall_policy_association": resourceComputeFirewallPolicyAssociation(), + "google_compute_firewall_policy": resourceComputeFirewallPolicy(), + "google_compute_firewall_policy_rule": resourceComputeFirewallPolicyRule(), + "google_dataproc_workflow_template": resourceDataprocWorkflowTemplate(), + "google_eventarc_trigger": resourceEventarcTrigger(), + "google_gke_hub_feature": resourceGkeHubFeature(), + "google_gke_hub_feature_membership": resourceGkeHubFeatureMembership(), + "google_privateca_certificate_template": resourcePrivatecaCertificateTemplate(), + }, + // ------------------------------------ map[string]*schema.Resource{ "google_bigtable_instance_iam_binding": ResourceIamBinding(IamBigtableInstanceSchema, NewBigtableInstanceUpdater, BigtableInstanceIdParseFunc), "google_bigtable_instance_iam_member": ResourceIamMember(IamBigtableInstanceSchema, NewBigtableInstanceUpdater, BigtableInstanceIdParseFunc), diff --git a/google-beta/resource_dataproc_cluster_test.go b/google-beta/resource_dataproc_cluster_test.go index 8f3596cc80..79b887900b 100644 --- a/google-beta/resource_dataproc_cluster_test.go +++ b/google-beta/resource_dataproc_cluster_test.go @@ -13,8 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - dataproc "google.golang.org/api/dataproc/v1beta2" "google.golang.org/api/googleapi" + + dataproc "google.golang.org/api/dataproc/v1beta2" ) func TestDataprocExtractInitTimeout(t *testing.T) {