Skip to content

Commit 32df871

Browse files
committed
adding force destroy to cleanup state buckets with empty state in gcp
1 parent 96907bf commit 32df871

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gcp/shared-state/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ resource "random_id" "suffix" {
2323
}
2424

2525
resource "google_storage_bucket" "state_bucket" {
26-
name = "tfstate-wrongsecrets-${random_id.suffix.hex}"
27-
location = var.region
26+
name = "tfstate-wrongsecrets-${random_id.suffix.hex}"
27+
location = var.region
28+
force_destroy = true
2829

2930
versioning {
3031
enabled = true

0 commit comments

Comments
 (0)