From eea40cc91b39d8613ca6805c6a361da2bba13d44 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 10 Dec 2024 11:37:48 -0800 Subject: [PATCH] Fixed sweeping of incidentally-created queues (#12529) (#8885) [upstream:5c620d651d045d3053c8f4cf86a315ff5318f3bd] Signed-off-by: Modular Magician --- .changelog/12529.txt | 3 +++ google-beta/sweeper/gcp_sweeper.go | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 .changelog/12529.txt diff --git a/.changelog/12529.txt b/.changelog/12529.txt new file mode 100644 index 0000000000..42b910df15 --- /dev/null +++ b/.changelog/12529.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` \ No newline at end of file diff --git a/google-beta/sweeper/gcp_sweeper.go b/google-beta/sweeper/gcp_sweeper.go index 63a582560a..d4c77f7bb9 100644 --- a/google-beta/sweeper/gcp_sweeper.go +++ b/google-beta/sweeper/gcp_sweeper.go @@ -23,6 +23,7 @@ var testResourcePrefixes = []string{ // include a "-" or "_" respectively, and they are the preferred prefix for our test resources to use "tf-test", "tf_test", + // Resource-specific prefixes that should be moved to the corresponding resource sweeper as part of https://github.com/hashicorp/terraform-provider-google/issues/20638 "tfgen", "gke-us-central1-tf", // composer-created disks which are abandoned by design (https://cloud.google.com/composer/pricing) "gcs-bucket-tf-test-", // https://github.com/hashicorp/terraform-provider-google/issues/8909 @@ -30,6 +31,7 @@ var testResourcePrefixes = []string{ "resourcegroup-", // https://github.com/hashicorp/terraform-provider-google/issues/8924 "cluster-", // https://github.com/hashicorp/terraform-provider-google/issues/8924 "k8s-fw-", // firewall rules are getting created and not cleaned up by k8 resources using this prefix + "ext-tf-test", // Cloud Tasks Queues created automatically by tests for `google_firebase_extensions_instance`. } // SharedConfigForRegion returns a common config setup needed for the sweeper