From e8e63169b06f6202dd7646aa4a4a48520ff23533 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 24 Apr 2020 15:19:25 -0400 Subject: [PATCH] Fix BillingBudget sweeper (#3420) (#6201) Signed-off-by: Modular Magician --- .changelog/3420.txt | 3 +++ ...source_app_engine_domain_mapping_sweeper_test.go | 13 +++++++++---- ...ce_bigquery_data_transfer_config_sweeper_test.go | 13 +++++++++---- ...ce_binary_authorization_attestor_sweeper_test.go | 13 +++++++++---- google/resource_cloud_build_trigger_sweeper_test.go | 13 +++++++++---- ...esource_cloud_run_domain_mapping_sweeper_test.go | 13 +++++++++---- google/resource_cloud_run_service_sweeper_test.go | 13 +++++++++---- google/resource_cloud_scheduler_job_sweeper_test.go | 13 +++++++++---- google/resource_cloud_tasks_queue_sweeper_test.go | 13 +++++++++---- google/resource_compute_address_sweeper_test.go | 13 +++++++++---- google/resource_compute_autoscaler_sweeper_test.go | 13 +++++++++---- ...te_backend_bucket_signed_url_key_sweeper_test.go | 13 +++++++++---- .../resource_compute_backend_bucket_sweeper_test.go | 13 +++++++++---- ...e_backend_service_signed_url_key_sweeper_test.go | 13 +++++++++---- ...resource_compute_backend_service_sweeper_test.go | 13 +++++++++---- google/resource_compute_firewall_sweeper_test.go | 13 +++++++++---- ...resource_compute_forwarding_rule_sweeper_test.go | 13 +++++++++---- .../resource_compute_global_address_sweeper_test.go | 13 +++++++++---- ...e_compute_global_forwarding_rule_sweeper_test.go | 13 +++++++++---- ...te_global_network_endpoint_group_sweeper_test.go | 13 +++++++++---- .../resource_compute_health_check_sweeper_test.go | 13 +++++++++---- ...source_compute_http_health_check_sweeper_test.go | 13 +++++++++---- ...ource_compute_https_health_check_sweeper_test.go | 13 +++++++++---- google/resource_compute_image_sweeper_test.go | 13 +++++++++---- ...ompute_instance_group_named_port_sweeper_test.go | 13 +++++++++---- ...e_compute_network_endpoint_group_sweeper_test.go | 13 +++++++++---- google/resource_compute_network_sweeper_test.go | 13 +++++++++---- google/resource_compute_node_group_sweeper_test.go | 13 +++++++++---- .../resource_compute_node_template_sweeper_test.go | 13 +++++++++---- ...source_compute_region_autoscaler_sweeper_test.go | 13 +++++++++---- ...e_compute_region_backend_service_sweeper_test.go | 13 +++++++++---- ...urce_compute_region_health_check_sweeper_test.go | 13 +++++++++---- ...e_compute_region_ssl_certificate_sweeper_test.go | 13 +++++++++---- google/resource_compute_reservation_sweeper_test.go | 13 +++++++++---- ...resource_compute_resource_policy_sweeper_test.go | 13 +++++++++---- google/resource_compute_route_sweeper_test.go | 13 +++++++++---- ...resource_compute_router_bgp_peer_sweeper_test.go | 13 +++++++++---- google/resource_compute_router_nat_sweeper_test.go | 13 +++++++++---- google/resource_compute_router_sweeper_test.go | 13 +++++++++---- google/resource_compute_snapshot_sweeper_test.go | 13 +++++++++---- ...resource_compute_ssl_certificate_sweeper_test.go | 13 +++++++++---- google/resource_compute_ssl_policy_sweeper_test.go | 13 +++++++++---- google/resource_compute_subnetwork_sweeper_test.go | 13 +++++++++---- ...source_compute_target_http_proxy_sweeper_test.go | 13 +++++++++---- ...ource_compute_target_https_proxy_sweeper_test.go | 13 +++++++++---- ...resource_compute_target_instance_sweeper_test.go | 13 +++++++++---- ...esource_compute_target_ssl_proxy_sweeper_test.go | 13 +++++++++---- ...esource_compute_target_tcp_proxy_sweeper_test.go | 13 +++++++++---- google/resource_compute_url_map_sweeper_test.go | 13 +++++++++---- google/resource_compute_vpn_gateway_sweeper_test.go | 13 +++++++++---- google/resource_compute_vpn_tunnel_sweeper_test.go | 13 +++++++++---- ...resource_container_analysis_note_sweeper_test.go | 13 +++++++++---- ...urce_dataproc_autoscaling_policy_sweeper_test.go | 13 +++++++++---- ...ce_deployment_manager_deployment_sweeper_test.go | 13 +++++++++---- google/resource_dns_managed_zone_sweeper_test.go | 13 +++++++++---- google/resource_filestore_instance_sweeper_test.go | 13 +++++++++---- google/resource_healthcare_dataset_sweeper_test.go | 13 +++++++++---- ...orm_default_supported_idp_config_sweeper_test.go | 13 +++++++++---- ...ity_platform_inbound_saml_config_sweeper_test.go | 13 +++++++++---- ...entity_platform_oauth_idp_config_sweeper_test.go | 13 +++++++++---- ...tform_tenant_inbound_saml_config_sweeper_test.go | 13 +++++++++---- ...platform_tenant_oauth_idp_config_sweeper_test.go | 13 +++++++++---- ...esource_identity_platform_tenant_sweeper_test.go | 13 +++++++++---- google/resource_logging_metric_sweeper_test.go | 13 +++++++++---- google/resource_ml_engine_model_sweeper_test.go | 13 +++++++++---- ...resource_monitoring_alert_policy_sweeper_test.go | 13 +++++++++---- google/resource_monitoring_group_sweeper_test.go | 13 +++++++++---- ..._monitoring_notification_channel_sweeper_test.go | 13 +++++++++---- google/resource_monitoring_service_sweeper_test.go | 13 +++++++++---- google/resource_monitoring_slo_sweeper_test.go | 13 +++++++++---- ...e_monitoring_uptime_check_config_sweeper_test.go | 13 +++++++++---- ...resource_os_login_ssh_public_key_sweeper_test.go | 13 +++++++++---- google/resource_pubsub_subscription_sweeper_test.go | 13 +++++++++---- google/resource_pubsub_topic_sweeper_test.go | 13 +++++++++---- google/resource_redis_instance_sweeper_test.go | 13 +++++++++---- .../resource_source_repo_repository_sweeper_test.go | 13 +++++++++---- google/resource_spanner_instance_sweeper_test.go | 13 +++++++++---- ...l_source_representation_instance_sweeper_test.go | 13 +++++++++---- google/resource_tpu_node_sweeper_test.go | 13 +++++++++---- .../resource_vpc_access_connector_sweeper_test.go | 13 +++++++++---- 80 files changed, 714 insertions(+), 316 deletions(-) create mode 100644 .changelog/3420.txt diff --git a/.changelog/3420.txt b/.changelog/3420.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/3420.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_app_engine_domain_mapping_sweeper_test.go b/google/resource_app_engine_domain_mapping_sweeper_test.go index 5e06d45f4cb..37b3af0adb3 100644 --- a/google/resource_app_engine_domain_mapping_sweeper_test.go +++ b/google/resource_app_engine_domain_mapping_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepAppEngineDomainMapping(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_bigquery_data_transfer_config_sweeper_test.go b/google/resource_bigquery_data_transfer_config_sweeper_test.go index fb4456c4bba..3bb737abe8f 100644 --- a/google/resource_bigquery_data_transfer_config_sweeper_test.go +++ b/google/resource_bigquery_data_transfer_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepBigqueryDataTransferConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_binary_authorization_attestor_sweeper_test.go b/google/resource_binary_authorization_attestor_sweeper_test.go index fe37970ad4c..b94d3460259 100644 --- a/google/resource_binary_authorization_attestor_sweeper_test.go +++ b/google/resource_binary_authorization_attestor_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepBinaryAuthorizationAttestor(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_cloud_build_trigger_sweeper_test.go b/google/resource_cloud_build_trigger_sweeper_test.go index cdcffdc5a55..ebda3b4cb01 100644 --- a/google/resource_cloud_build_trigger_sweeper_test.go +++ b/google/resource_cloud_build_trigger_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepCloudBuildTrigger(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_cloud_run_domain_mapping_sweeper_test.go b/google/resource_cloud_run_domain_mapping_sweeper_test.go index e6d0d72b8cd..06f32bcd5d6 100644 --- a/google/resource_cloud_run_domain_mapping_sweeper_test.go +++ b/google/resource_cloud_run_domain_mapping_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepCloudRunDomainMapping(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_cloud_run_service_sweeper_test.go b/google/resource_cloud_run_service_sweeper_test.go index 9c49c0d8450..bd82f3c9d86 100644 --- a/google/resource_cloud_run_service_sweeper_test.go +++ b/google/resource_cloud_run_service_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepCloudRunService(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_cloud_scheduler_job_sweeper_test.go b/google/resource_cloud_scheduler_job_sweeper_test.go index 92fb1999519..d21112a1591 100644 --- a/google/resource_cloud_scheduler_job_sweeper_test.go +++ b/google/resource_cloud_scheduler_job_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepCloudSchedulerJob(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_cloud_tasks_queue_sweeper_test.go b/google/resource_cloud_tasks_queue_sweeper_test.go index 346f27edc6e..8ecf802045f 100644 --- a/google/resource_cloud_tasks_queue_sweeper_test.go +++ b/google/resource_cloud_tasks_queue_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepCloudTasksQueue(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_address_sweeper_test.go b/google/resource_compute_address_sweeper_test.go index a61a59651ea..d79376b1d1e 100644 --- a/google/resource_compute_address_sweeper_test.go +++ b/google/resource_compute_address_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeAddress(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_autoscaler_sweeper_test.go b/google/resource_compute_autoscaler_sweeper_test.go index 6aea886ca8c..a5a3e8f1943 100644 --- a/google/resource_compute_autoscaler_sweeper_test.go +++ b/google/resource_compute_autoscaler_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeAutoscaler(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_backend_bucket_signed_url_key_sweeper_test.go b/google/resource_compute_backend_bucket_signed_url_key_sweeper_test.go index 2fcf2e4df62..453217a3901 100644 --- a/google/resource_compute_backend_bucket_signed_url_key_sweeper_test.go +++ b/google/resource_compute_backend_bucket_signed_url_key_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeBackendBucketSignedUrlKey(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_backend_bucket_sweeper_test.go b/google/resource_compute_backend_bucket_sweeper_test.go index 33fe4d0d5d9..7b031bacd6e 100644 --- a/google/resource_compute_backend_bucket_sweeper_test.go +++ b/google/resource_compute_backend_bucket_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeBackendBucket(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_backend_service_signed_url_key_sweeper_test.go b/google/resource_compute_backend_service_signed_url_key_sweeper_test.go index 1aef94bfc08..510b2bf68d3 100644 --- a/google/resource_compute_backend_service_signed_url_key_sweeper_test.go +++ b/google/resource_compute_backend_service_signed_url_key_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeBackendServiceSignedUrlKey(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_backend_service_sweeper_test.go b/google/resource_compute_backend_service_sweeper_test.go index c452ce46335..ad4a07dd604 100644 --- a/google/resource_compute_backend_service_sweeper_test.go +++ b/google/resource_compute_backend_service_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeBackendService(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_firewall_sweeper_test.go b/google/resource_compute_firewall_sweeper_test.go index 793938a97bf..5c41095ea55 100644 --- a/google/resource_compute_firewall_sweeper_test.go +++ b/google/resource_compute_firewall_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeFirewall(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_forwarding_rule_sweeper_test.go b/google/resource_compute_forwarding_rule_sweeper_test.go index a32b3af704e..feb50b34aa4 100644 --- a/google/resource_compute_forwarding_rule_sweeper_test.go +++ b/google/resource_compute_forwarding_rule_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeForwardingRule(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_global_address_sweeper_test.go b/google/resource_compute_global_address_sweeper_test.go index 20e1ec7c3b0..04d2ce78691 100644 --- a/google/resource_compute_global_address_sweeper_test.go +++ b/google/resource_compute_global_address_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeGlobalAddress(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_global_forwarding_rule_sweeper_test.go b/google/resource_compute_global_forwarding_rule_sweeper_test.go index 119e90e8069..cdc71067fd6 100644 --- a/google/resource_compute_global_forwarding_rule_sweeper_test.go +++ b/google/resource_compute_global_forwarding_rule_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeGlobalForwardingRule(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_global_network_endpoint_group_sweeper_test.go b/google/resource_compute_global_network_endpoint_group_sweeper_test.go index 5b9bd98c05f..366237da499 100644 --- a/google/resource_compute_global_network_endpoint_group_sweeper_test.go +++ b/google/resource_compute_global_network_endpoint_group_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeGlobalNetworkEndpointGroup(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_health_check_sweeper_test.go b/google/resource_compute_health_check_sweeper_test.go index 1c5dd8049f6..36430f4425c 100644 --- a/google/resource_compute_health_check_sweeper_test.go +++ b/google/resource_compute_health_check_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeHealthCheck(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_http_health_check_sweeper_test.go b/google/resource_compute_http_health_check_sweeper_test.go index f31597636eb..e68cb2f20d5 100644 --- a/google/resource_compute_http_health_check_sweeper_test.go +++ b/google/resource_compute_http_health_check_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeHttpHealthCheck(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_https_health_check_sweeper_test.go b/google/resource_compute_https_health_check_sweeper_test.go index 9c6296c4efd..adbcdceda9a 100644 --- a/google/resource_compute_https_health_check_sweeper_test.go +++ b/google/resource_compute_https_health_check_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeHttpsHealthCheck(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_image_sweeper_test.go b/google/resource_compute_image_sweeper_test.go index 9e38444397a..8870e7faf91 100644 --- a/google/resource_compute_image_sweeper_test.go +++ b/google/resource_compute_image_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeImage(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_instance_group_named_port_sweeper_test.go b/google/resource_compute_instance_group_named_port_sweeper_test.go index 24cb7c127a9..07b7008daf1 100644 --- a/google/resource_compute_instance_group_named_port_sweeper_test.go +++ b/google/resource_compute_instance_group_named_port_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeInstanceGroupNamedPort(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_network_endpoint_group_sweeper_test.go b/google/resource_compute_network_endpoint_group_sweeper_test.go index 82e1e66cd90..ffa17e1995c 100644 --- a/google/resource_compute_network_endpoint_group_sweeper_test.go +++ b/google/resource_compute_network_endpoint_group_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeNetworkEndpointGroup(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_network_sweeper_test.go b/google/resource_compute_network_sweeper_test.go index a9ce1723370..78970b6101f 100644 --- a/google/resource_compute_network_sweeper_test.go +++ b/google/resource_compute_network_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeNetwork(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_node_group_sweeper_test.go b/google/resource_compute_node_group_sweeper_test.go index 975bb4173ad..1593c3ff2a3 100644 --- a/google/resource_compute_node_group_sweeper_test.go +++ b/google/resource_compute_node_group_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeNodeGroup(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_node_template_sweeper_test.go b/google/resource_compute_node_template_sweeper_test.go index cf66ed8716a..1a065f7cfe0 100644 --- a/google/resource_compute_node_template_sweeper_test.go +++ b/google/resource_compute_node_template_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeNodeTemplate(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_region_autoscaler_sweeper_test.go b/google/resource_compute_region_autoscaler_sweeper_test.go index 4914218aadd..c44b2e4a694 100644 --- a/google/resource_compute_region_autoscaler_sweeper_test.go +++ b/google/resource_compute_region_autoscaler_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRegionAutoscaler(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_region_backend_service_sweeper_test.go b/google/resource_compute_region_backend_service_sweeper_test.go index 6923e42d1d9..81ea2feb7bd 100644 --- a/google/resource_compute_region_backend_service_sweeper_test.go +++ b/google/resource_compute_region_backend_service_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRegionBackendService(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_region_health_check_sweeper_test.go b/google/resource_compute_region_health_check_sweeper_test.go index 503164a7eee..2fc6dc911a2 100644 --- a/google/resource_compute_region_health_check_sweeper_test.go +++ b/google/resource_compute_region_health_check_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRegionHealthCheck(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_region_ssl_certificate_sweeper_test.go b/google/resource_compute_region_ssl_certificate_sweeper_test.go index 9525dc1d003..e35e0923d4f 100644 --- a/google/resource_compute_region_ssl_certificate_sweeper_test.go +++ b/google/resource_compute_region_ssl_certificate_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRegionSslCertificate(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_reservation_sweeper_test.go b/google/resource_compute_reservation_sweeper_test.go index f92b3751533..30cb767bed3 100644 --- a/google/resource_compute_reservation_sweeper_test.go +++ b/google/resource_compute_reservation_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeReservation(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_resource_policy_sweeper_test.go b/google/resource_compute_resource_policy_sweeper_test.go index cbb086ab04f..533592c69a7 100644 --- a/google/resource_compute_resource_policy_sweeper_test.go +++ b/google/resource_compute_resource_policy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeResourcePolicy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_route_sweeper_test.go b/google/resource_compute_route_sweeper_test.go index 80c3f7b2c7a..d7aa0e16faf 100644 --- a/google/resource_compute_route_sweeper_test.go +++ b/google/resource_compute_route_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRoute(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_router_bgp_peer_sweeper_test.go b/google/resource_compute_router_bgp_peer_sweeper_test.go index e5e1a1ead99..c584f8b7187 100644 --- a/google/resource_compute_router_bgp_peer_sweeper_test.go +++ b/google/resource_compute_router_bgp_peer_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRouterBgpPeer(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_router_nat_sweeper_test.go b/google/resource_compute_router_nat_sweeper_test.go index 25c0a9af63b..3b4f4fee6c2 100644 --- a/google/resource_compute_router_nat_sweeper_test.go +++ b/google/resource_compute_router_nat_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRouterNat(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_router_sweeper_test.go b/google/resource_compute_router_sweeper_test.go index 9724a9793ab..11a802d3f6d 100644 --- a/google/resource_compute_router_sweeper_test.go +++ b/google/resource_compute_router_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeRouter(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_snapshot_sweeper_test.go b/google/resource_compute_snapshot_sweeper_test.go index 1efbbbc34da..ad43710e0b7 100644 --- a/google/resource_compute_snapshot_sweeper_test.go +++ b/google/resource_compute_snapshot_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeSnapshot(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_ssl_certificate_sweeper_test.go b/google/resource_compute_ssl_certificate_sweeper_test.go index 696f579ea40..1fa681cd91e 100644 --- a/google/resource_compute_ssl_certificate_sweeper_test.go +++ b/google/resource_compute_ssl_certificate_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeSslCertificate(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_ssl_policy_sweeper_test.go b/google/resource_compute_ssl_policy_sweeper_test.go index cb31200cc46..bdae78e418a 100644 --- a/google/resource_compute_ssl_policy_sweeper_test.go +++ b/google/resource_compute_ssl_policy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeSslPolicy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_subnetwork_sweeper_test.go b/google/resource_compute_subnetwork_sweeper_test.go index 49a2fab5544..8de326ef272 100644 --- a/google/resource_compute_subnetwork_sweeper_test.go +++ b/google/resource_compute_subnetwork_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeSubnetwork(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_target_http_proxy_sweeper_test.go b/google/resource_compute_target_http_proxy_sweeper_test.go index fc2b887502e..5ca58cceb9c 100644 --- a/google/resource_compute_target_http_proxy_sweeper_test.go +++ b/google/resource_compute_target_http_proxy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeTargetHttpProxy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_target_https_proxy_sweeper_test.go b/google/resource_compute_target_https_proxy_sweeper_test.go index 95ef104f6a2..0a089e4322f 100644 --- a/google/resource_compute_target_https_proxy_sweeper_test.go +++ b/google/resource_compute_target_https_proxy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeTargetHttpsProxy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_target_instance_sweeper_test.go b/google/resource_compute_target_instance_sweeper_test.go index f53a803ebd4..23a62f8c47b 100644 --- a/google/resource_compute_target_instance_sweeper_test.go +++ b/google/resource_compute_target_instance_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeTargetInstance(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_target_ssl_proxy_sweeper_test.go b/google/resource_compute_target_ssl_proxy_sweeper_test.go index 0a375c81188..3329b5b1a04 100644 --- a/google/resource_compute_target_ssl_proxy_sweeper_test.go +++ b/google/resource_compute_target_ssl_proxy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeTargetSslProxy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_target_tcp_proxy_sweeper_test.go b/google/resource_compute_target_tcp_proxy_sweeper_test.go index a26dc2189fa..49a77934ff5 100644 --- a/google/resource_compute_target_tcp_proxy_sweeper_test.go +++ b/google/resource_compute_target_tcp_proxy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeTargetTcpProxy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_url_map_sweeper_test.go b/google/resource_compute_url_map_sweeper_test.go index bfb813af4c5..628c97360ff 100644 --- a/google/resource_compute_url_map_sweeper_test.go +++ b/google/resource_compute_url_map_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeUrlMap(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_vpn_gateway_sweeper_test.go b/google/resource_compute_vpn_gateway_sweeper_test.go index d0f73b2a36d..f692bf27697 100644 --- a/google/resource_compute_vpn_gateway_sweeper_test.go +++ b/google/resource_compute_vpn_gateway_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeVpnGateway(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_compute_vpn_tunnel_sweeper_test.go b/google/resource_compute_vpn_tunnel_sweeper_test.go index 4da26e1d763..ed43c79c024 100644 --- a/google/resource_compute_vpn_tunnel_sweeper_test.go +++ b/google/resource_compute_vpn_tunnel_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepComputeVpnTunnel(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_container_analysis_note_sweeper_test.go b/google/resource_container_analysis_note_sweeper_test.go index 063385f04a3..b0a6ef85d93 100644 --- a/google/resource_container_analysis_note_sweeper_test.go +++ b/google/resource_container_analysis_note_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepContainerAnalysisNote(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_dataproc_autoscaling_policy_sweeper_test.go b/google/resource_dataproc_autoscaling_policy_sweeper_test.go index 70d23bf6688..ffcad561f47 100644 --- a/google/resource_dataproc_autoscaling_policy_sweeper_test.go +++ b/google/resource_dataproc_autoscaling_policy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepDataprocAutoscalingPolicy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_deployment_manager_deployment_sweeper_test.go b/google/resource_deployment_manager_deployment_sweeper_test.go index 8af3aed2b8d..68e1f88c758 100644 --- a/google/resource_deployment_manager_deployment_sweeper_test.go +++ b/google/resource_deployment_manager_deployment_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepDeploymentManagerDeployment(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_dns_managed_zone_sweeper_test.go b/google/resource_dns_managed_zone_sweeper_test.go index 2b799413b18..5f3f9b0459e 100644 --- a/google/resource_dns_managed_zone_sweeper_test.go +++ b/google/resource_dns_managed_zone_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepDNSManagedZone(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_filestore_instance_sweeper_test.go b/google/resource_filestore_instance_sweeper_test.go index f212c0e1767..a8869b7cee1 100644 --- a/google/resource_filestore_instance_sweeper_test.go +++ b/google/resource_filestore_instance_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepFilestoreInstance(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_healthcare_dataset_sweeper_test.go b/google/resource_healthcare_dataset_sweeper_test.go index bfec13bb1eb..7e59f127667 100644 --- a/google/resource_healthcare_dataset_sweeper_test.go +++ b/google/resource_healthcare_dataset_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepHealthcareDataset(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_default_supported_idp_config_sweeper_test.go b/google/resource_identity_platform_default_supported_idp_config_sweeper_test.go index 5ee78905739..3217c27253e 100644 --- a/google/resource_identity_platform_default_supported_idp_config_sweeper_test.go +++ b/google/resource_identity_platform_default_supported_idp_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformDefaultSupportedIdpConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_inbound_saml_config_sweeper_test.go b/google/resource_identity_platform_inbound_saml_config_sweeper_test.go index 9f429bd8635..a9c47bfc1a0 100644 --- a/google/resource_identity_platform_inbound_saml_config_sweeper_test.go +++ b/google/resource_identity_platform_inbound_saml_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformInboundSamlConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_oauth_idp_config_sweeper_test.go b/google/resource_identity_platform_oauth_idp_config_sweeper_test.go index f38cff06a4d..714383611dc 100644 --- a/google/resource_identity_platform_oauth_idp_config_sweeper_test.go +++ b/google/resource_identity_platform_oauth_idp_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformOauthIdpConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_tenant_inbound_saml_config_sweeper_test.go b/google/resource_identity_platform_tenant_inbound_saml_config_sweeper_test.go index e909c9b919f..feeb614770a 100644 --- a/google/resource_identity_platform_tenant_inbound_saml_config_sweeper_test.go +++ b/google/resource_identity_platform_tenant_inbound_saml_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformTenantInboundSamlConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_tenant_oauth_idp_config_sweeper_test.go b/google/resource_identity_platform_tenant_oauth_idp_config_sweeper_test.go index 26d23c67084..c95308a53c4 100644 --- a/google/resource_identity_platform_tenant_oauth_idp_config_sweeper_test.go +++ b/google/resource_identity_platform_tenant_oauth_idp_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformTenantOauthIdpConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_identity_platform_tenant_sweeper_test.go b/google/resource_identity_platform_tenant_sweeper_test.go index 1984a71d3d3..bc0dddea613 100644 --- a/google/resource_identity_platform_tenant_sweeper_test.go +++ b/google/resource_identity_platform_tenant_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepIdentityPlatformTenant(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_logging_metric_sweeper_test.go b/google/resource_logging_metric_sweeper_test.go index 53dee4651b4..f32d7d1c4ea 100644 --- a/google/resource_logging_metric_sweeper_test.go +++ b/google/resource_logging_metric_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepLoggingMetric(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_ml_engine_model_sweeper_test.go b/google/resource_ml_engine_model_sweeper_test.go index fa76a173d3e..d9e7d1ae71a 100644 --- a/google/resource_ml_engine_model_sweeper_test.go +++ b/google/resource_ml_engine_model_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMLEngineModel(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_alert_policy_sweeper_test.go b/google/resource_monitoring_alert_policy_sweeper_test.go index a6b04b6363d..836720fb645 100644 --- a/google/resource_monitoring_alert_policy_sweeper_test.go +++ b/google/resource_monitoring_alert_policy_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringAlertPolicy(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_group_sweeper_test.go b/google/resource_monitoring_group_sweeper_test.go index 336736165b8..68c4b52bcd1 100644 --- a/google/resource_monitoring_group_sweeper_test.go +++ b/google/resource_monitoring_group_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringGroup(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_notification_channel_sweeper_test.go b/google/resource_monitoring_notification_channel_sweeper_test.go index 0e8fa8abd65..08b0b68df74 100644 --- a/google/resource_monitoring_notification_channel_sweeper_test.go +++ b/google/resource_monitoring_notification_channel_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringNotificationChannel(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_service_sweeper_test.go b/google/resource_monitoring_service_sweeper_test.go index 4e6f0827f91..33af6e5112f 100644 --- a/google/resource_monitoring_service_sweeper_test.go +++ b/google/resource_monitoring_service_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringService(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_slo_sweeper_test.go b/google/resource_monitoring_slo_sweeper_test.go index 1b12e41619c..8051efda43d 100644 --- a/google/resource_monitoring_slo_sweeper_test.go +++ b/google/resource_monitoring_slo_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringSlo(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_monitoring_uptime_check_config_sweeper_test.go b/google/resource_monitoring_uptime_check_config_sweeper_test.go index 506966dba67..0d33db0a030 100644 --- a/google/resource_monitoring_uptime_check_config_sweeper_test.go +++ b/google/resource_monitoring_uptime_check_config_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepMonitoringUptimeCheckConfig(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_os_login_ssh_public_key_sweeper_test.go b/google/resource_os_login_ssh_public_key_sweeper_test.go index d0a8e55a56e..e52bf975f93 100644 --- a/google/resource_os_login_ssh_public_key_sweeper_test.go +++ b/google/resource_os_login_ssh_public_key_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepOSLoginSSHPublicKey(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_pubsub_subscription_sweeper_test.go b/google/resource_pubsub_subscription_sweeper_test.go index 6390ad0df5d..defd580c037 100644 --- a/google/resource_pubsub_subscription_sweeper_test.go +++ b/google/resource_pubsub_subscription_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepPubsubSubscription(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_pubsub_topic_sweeper_test.go b/google/resource_pubsub_topic_sweeper_test.go index f1f91dde98a..8506d2c8dba 100644 --- a/google/resource_pubsub_topic_sweeper_test.go +++ b/google/resource_pubsub_topic_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepPubsubTopic(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_redis_instance_sweeper_test.go b/google/resource_redis_instance_sweeper_test.go index 707130adc5b..3c79fb68bee 100644 --- a/google/resource_redis_instance_sweeper_test.go +++ b/google/resource_redis_instance_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepRedisInstance(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_source_repo_repository_sweeper_test.go b/google/resource_source_repo_repository_sweeper_test.go index 53e7b9e4ded..04ea873c864 100644 --- a/google/resource_source_repo_repository_sweeper_test.go +++ b/google/resource_source_repo_repository_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepSourceRepoRepository(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_spanner_instance_sweeper_test.go b/google/resource_spanner_instance_sweeper_test.go index 645833159f3..43edb2c62ec 100644 --- a/google/resource_spanner_instance_sweeper_test.go +++ b/google/resource_spanner_instance_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepSpannerInstance(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_sql_source_representation_instance_sweeper_test.go b/google/resource_sql_source_representation_instance_sweeper_test.go index d3bdf7ece55..2d19394d9ce 100644 --- a/google/resource_sql_source_representation_instance_sweeper_test.go +++ b/google/resource_sql_source_representation_instance_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepSQLSourceRepresentationInstance(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_tpu_node_sweeper_test.go b/google/resource_tpu_node_sweeper_test.go index 79cce584061..73a05947cb4 100644 --- a/google/resource_tpu_node_sweeper_test.go +++ b/google/resource_tpu_node_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepTPUNode(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, } diff --git a/google/resource_vpc_access_connector_sweeper_test.go b/google/resource_vpc_access_connector_sweeper_test.go index a83a6f12c43..f262461f8f0 100644 --- a/google/resource_vpc_access_connector_sweeper_test.go +++ b/google/resource_vpc_access_connector_sweeper_test.go @@ -18,6 +18,7 @@ import ( "context" "log" "strings" + "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -46,13 +47,17 @@ func testSweepVPCAccessConnector(region string) error { return err } + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + // Setup variables to replace in list template d := &ResourceDataMock{ FieldsInSchema: map[string]interface{}{ - "project": config.Project, - "region": region, - "location": region, - "zone": "-", + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, }, }