Skip to content

Commit ce8b6e8

Browse files
committed
fix(cloudrun): add deletion_protection to jobs, remove beta
1 parent 1e24694 commit ce8b6e8

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

run/jobs_create/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ resource "google_project_service" "cloudrun_api" {
2727
# Create basic Cloud Run Job using sample container image
2828
#[START cloudrun_jobs_create]
2929
resource "google_cloud_run_v2_job" "default" {
30-
provider = google-beta
3130
name = "cloud-run-job"
3231
location = "us-central1"
33-
launch_stage = "BETA"
32+
33+
deletion_protection = false # set to "true" in production
3434

3535
template {
3636
template {

run/jobs_execute_jobs_on_schedule/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ resource "google_project_iam_binding" "token_creator_binding" {
6767

6868
# Cloud Run Job
6969
resource "google_cloud_run_v2_job" "default" {
70-
provider = google-beta
7170
name = "cloud-run-job"
7271
location = "us-central1"
73-
launch_stage = "BETA"
74-
project = data.google_project.project.project_id
72+
73+
deletion_protection = false # set to "true" in production
7574

7675
template {
7776
template {

run/jobs_max_retries_create/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ resource "google_project_service" "cloudrun_api" {
2828
resource "google_cloud_run_v2_job" "default" {
2929
name = "cloud-run-job-retries"
3030
location = "us-central1"
31-
launch_stage = "BETA"
31+
32+
deletion_protection = false # set to "true" in production
3233

3334
template {
3435
template {

run/jobs_task_parallelism_create/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ resource "google_project_service" "cloudrun_api" {
2828
resource "google_cloud_run_v2_job" "default" {
2929
name = "cloud-run-job-parallelism"
3030
location = "us-central1"
31-
launch_stage = "BETA"
31+
32+
deletion_protection = false # set to "true" in production
3233

3334
template {
3435
task_count = 3

run/jobs_task_timeout_create/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ resource "google_project_service" "cloudrun_api" {
2828
resource "google_cloud_run_v2_job" "default" {
2929
name = "cloud-run-job-timeout"
3030
location = "us-central1"
31-
launch_stage = "BETA"
31+
32+
deletion_protection = false # set to "true" in production
3233

3334
template {
3435
template {

0 commit comments

Comments
 (0)