Skip to content

Commit

Permalink
Make deletion_policy field for Project resource PREVENT by default …
Browse files Browse the repository at this point in the history
…(#11255) (#7955)

[upstream:9905a08d80a5fc0bc137ae2cb06bac27e29678ac]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Aug 13, 2024
1 parent f262963 commit 67547a5
Show file tree
Hide file tree
Showing 175 changed files with 445 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .changelog/11255.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
resourcemanager: Make `deletion-policy` in `google_project` 'PREVENT' by default. This makes deleting them require an explicit intent. `google_project` resources cannot be destroyed unless `deletion_policy` is set to 'ABANDON' or 'NONE' for the resource.
```
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func createScopedPolicy(t *testing.T, org string) string {
project_id = "acm-tf-test-%s"
name = "acm-tf-test-%s"
org_id = "%s"
deletion_policy = "DELETE"
}
resource "google_access_context_manager_access_policy" "access-policy" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -210,6 +211,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -298,6 +300,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -374,6 +377,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -448,6 +452,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test-%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -161,6 +162,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -260,6 +262,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test-%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -209,6 +210,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test-%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -195,6 +196,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -158,6 +159,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -251,6 +253,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -346,6 +349,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -500,6 +504,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -182,6 +183,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -152,6 +153,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -208,6 +210,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -364,6 +367,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -484,6 +488,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -634,6 +639,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -168,6 +169,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ resource "google_project" "project" {
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ resource "google_project" "project" {
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -104,6 +105,7 @@ resource "google_project" "project" {
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down Expand Up @@ -163,6 +165,7 @@ resource "google_project" "project" {
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resource "google_project" "project" {
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
deletion_policy = "DELETE"
}
resource "google_project_service" "apigee" {
Expand Down
Loading

0 comments on commit 67547a5

Please sign in to comment.