From 6dc76ada0d9d7221e7e1916dbf01cc135aaf78f6 Mon Sep 17 00:00:00 2001 From: jcromanu Date: Thu, 7 May 2026 15:35:07 -0600 Subject: [PATCH] Migrated resource compute security policy test to use transport_tpg --- .../resource_compute_security_policy_test.go.tmpl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_security_policy_test.go.tmpl b/mmv1/third_party/terraform/services/compute/resource_compute_security_policy_test.go.tmpl index 24f506920c90..808ada519f21 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_security_policy_test.go.tmpl +++ b/mmv1/third_party/terraform/services/compute/resource_compute_security_policy_test.go.tmpl @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" - "github.com/hashicorp/terraform-provider-google/google/services/compute" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" ) func TestAccComputeSecurityPolicy_basic(t *testing.T) { @@ -967,7 +967,14 @@ func testAccCheckComputeSecurityPolicyDestroyProducer(t *testing.T) func(s *terr pol := rs.Primary.Attributes["name"] - _, err := compute.NewClient(config, config.UserAgent).SecurityPolicies.Get(config.Project, pol).Do() + url := fmt.Sprintf("%sprojects/%s/global/securityPolicies/%s", config.ComputeBasePath, config.Project, pol) + _, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) if err == nil { return fmt.Errorf("Security policy %q still exists", pol) }