Skip to content

Commit 94a27ca

Browse files
committed
fix(cloudrun): make delete protection explicit
fixes #730
1 parent a6c4ce2 commit 94a27ca

File tree

31 files changed

+65
-1
lines changed

31 files changed

+65
-1
lines changed

eventarc/basic/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ resource "google_cloud_run_v2_service" "default" {
9393
name = "hello-events"
9494
location = "us-central1"
9595

96+
deletion_protection = false # set to "true" in production
97+
9698
template {
9799
containers {
98100
# This container will log received events

run/access_control/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ resource "google_cloud_run_v2_service" "default" {
2020
name = "cloud-run-srv"
2121
location = "us-central1"
2222

23+
deletion_protection = false # set to "true" in production
24+
2325
template {
2426
containers {
2527
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_concurrency/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-concurrency"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_containers/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-containers"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_cpu/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-cpu"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_cpu_allocation/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-cpu-allocation"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_description/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ resource "google_cloud_run_v2_service" "default" {
2323

2424
description = "This service has a custom description"
2525

26+
deletion_protection = false # set to "true" in production
27+
2628
template {
2729
containers {
2830
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_environment_variables/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-env-var"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_http2/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-h2c"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

run/cloud_run_configuration_labels/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "google_cloud_run_v2_service" "default" {
2121
name = "cloudrun-service-labels"
2222
location = "us-central1"
2323

24+
deletion_protection = false # set to "true" in production
25+
2426
template {
2527
containers {
2628
image = "us-docker.pkg.dev/cloudrun/container/hello"

0 commit comments

Comments
 (0)