diff --git a/run/add_tag/main.tf b/run/add_tag/main.tf index f4410ebde..b94f26eee 100644 --- a/run/add_tag/main.tf +++ b/run/add_tag/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template {} # Define the traffic split for each revision diff --git a/run/custom_domain_mapping/main.tf b/run/custom_domain_mapping/main.tf index 7412030d5..8b484aacf 100644 --- a/run/custom_domain_mapping/main.tf +++ b/run/custom_domain_mapping/main.tf @@ -19,6 +19,9 @@ resource "google_cloud_run_v2_service" "default" { name = "custom-domain" location = "us-central1" + + deletion_protection = false # set to true to prevent destruction of the resource + template { containers { image = "us-docker.pkg.dev/cloudrun/container/hello" diff --git a/run/pubsub/main.tf b/run/pubsub/main.tf index 0267f62ca..c818c64f6 100644 --- a/run/pubsub/main.tf +++ b/run/pubsub/main.tf @@ -28,6 +28,9 @@ resource "google_project_service" "cloudrun_api" { resource "google_cloud_run_v2_service" "default" { name = "pubsub-tutorial" location = "us-central1" + + deletion_protection = false # set to true to prevent destruction of the resource + template { containers { image = "us-docker.pkg.dev/cloudrun/container/hello" # Replace with newly created image gcr.io//pubsub diff --git a/run/remove_tag/main.tf b/run/remove_tag/main.tf index 821a4eb51..b560abcbf 100644 --- a/run/remove_tag/main.tf +++ b/run/remove_tag/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template {} # Define the traffic split for each revision diff --git a/run/traffic_gradual_rollout/main.tf b/run/traffic_gradual_rollout/main.tf index 223fd48bf..288f01d14 100644 --- a/run/traffic_gradual_rollout/main.tf +++ b/run/traffic_gradual_rollout/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template { containers { # Image or image tag must be different from previous revision diff --git a/run/traffic_latest_revision/main.tf b/run/traffic_latest_revision/main.tf index 3bd0e58ff..c5ba89cfa 100644 --- a/run/traffic_latest_revision/main.tf +++ b/run/traffic_latest_revision/main.tf @@ -20,6 +20,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template {} traffic { diff --git a/run/traffic_rollback/main.tf b/run/traffic_rollback/main.tf index c40dcd5ea..c1c444bac 100644 --- a/run/traffic_rollback/main.tf +++ b/run/traffic_rollback/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template {} traffic { diff --git a/run/traffic_split/main.tf b/run/traffic_split/main.tf index dc9f0aa50..6699ab3f6 100644 --- a/run/traffic_split/main.tf +++ b/run/traffic_split/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template { containers { image = "us-docker.pkg.dev/cloudrun/container/hello" diff --git a/run/traffic_split_tag/main.tf b/run/traffic_split_tag/main.tf index 86a6f32c6..7d6990451 100644 --- a/run/traffic_split_tag/main.tf +++ b/run/traffic_split_tag/main.tf @@ -19,6 +19,8 @@ resource "google_cloud_run_v2_service" "default" { name = "my-service" location = "us-central1" + deletion_protection = false # set to true to prevent destruction of the resource + template {} # Define the traffic split for each revision