From 8a6f281bad55b80c3e9f6d739729cb5d78646ab3 Mon Sep 17 00:00:00 2001 From: Benjamin Kaplan <58792807+bskaplan@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:48:06 -0800 Subject: [PATCH] feat: move emptydir to GA for cloudrun and cloudrunv2 (#12230) --- mmv1/products/cloudrun/Service.yaml | 1 - mmv1/products/cloudrunv2/Job.yaml | 2 -- mmv1/products/cloudrunv2/Service.yaml | 2 -- .../terraform/examples/cloudrunv2_job_emptydir.tf.tmpl | 2 -- .../examples/cloudrunv2_service_multicontainer.tf.tmpl | 2 -- .../cloudrun/resource_cloud_run_service_test.go.tmpl | 7 +------ 6 files changed, 1 insertion(+), 15 deletions(-) diff --git a/mmv1/products/cloudrun/Service.yaml b/mmv1/products/cloudrun/Service.yaml index dbc773c694ea..9e726b4a36d8 100644 --- a/mmv1/products/cloudrun/Service.yaml +++ b/mmv1/products/cloudrun/Service.yaml @@ -848,7 +848,6 @@ properties: type: NestedObject description: |- Ephemeral storage which can be backed by real disks (HD, SSD), network storage or memory (i.e. tmpfs). For now only in memory (tmpfs) is supported. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs). - min_version: 'beta' properties: - name: 'medium' type: String diff --git a/mmv1/products/cloudrunv2/Job.yaml b/mmv1/products/cloudrunv2/Job.yaml index ef5ffac6516a..0d21b6eb5956 100644 --- a/mmv1/products/cloudrunv2/Job.yaml +++ b/mmv1/products/cloudrunv2/Job.yaml @@ -112,7 +112,6 @@ examples: - name: 'cloudrunv2_job_emptydir' primary_resource_id: 'default' primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])' - min_version: 'beta' vars: cloud_run_job_name: 'cloudrun-job' ignore_read_extra: @@ -507,7 +506,6 @@ properties: type: NestedObject description: |- Ephemeral storage used as a shared volume. - min_version: 'beta' # exactly_one_of: # - template.0.template.0.volumes.0.secret # - template.0.template.0.volumes.0.cloudSqlInstance diff --git a/mmv1/products/cloudrunv2/Service.yaml b/mmv1/products/cloudrunv2/Service.yaml index 56ca579ceb8c..a6339cedd5d4 100644 --- a/mmv1/products/cloudrunv2/Service.yaml +++ b/mmv1/products/cloudrunv2/Service.yaml @@ -127,7 +127,6 @@ examples: - name: 'cloudrunv2_service_multicontainer' primary_resource_id: 'default' primary_resource_name: 'fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])' - min_version: 'beta' vars: cloud_run_service_name: 'cloudrun-service' ignore_read_extra: @@ -837,7 +836,6 @@ properties: type: NestedObject description: |- Ephemeral storage used as a shared volume. - min_version: 'beta' # exactly_one_of: # - template.0.volumes.0.secret # - template.0.volumes.0.cloudSqlInstance diff --git a/mmv1/templates/terraform/examples/cloudrunv2_job_emptydir.tf.tmpl b/mmv1/templates/terraform/examples/cloudrunv2_job_emptydir.tf.tmpl index fbabbe991fd8..4b3d7b944c7a 100644 --- a/mmv1/templates/terraform/examples/cloudrunv2_job_emptydir.tf.tmpl +++ b/mmv1/templates/terraform/examples/cloudrunv2_job_emptydir.tf.tmpl @@ -1,9 +1,7 @@ resource "google_cloud_run_v2_job" "{{$.PrimaryResourceId}}" { - provider = google-beta name = "{{index $.Vars "cloud_run_job_name"}}" location = "us-central1" deletion_protection = false - launch_stage = "BETA" template { template { containers { diff --git a/mmv1/templates/terraform/examples/cloudrunv2_service_multicontainer.tf.tmpl b/mmv1/templates/terraform/examples/cloudrunv2_service_multicontainer.tf.tmpl index 9ee26f40bda1..ecc50d871a34 100644 --- a/mmv1/templates/terraform/examples/cloudrunv2_service_multicontainer.tf.tmpl +++ b/mmv1/templates/terraform/examples/cloudrunv2_service_multicontainer.tf.tmpl @@ -1,9 +1,7 @@ resource "google_cloud_run_v2_service" "{{$.PrimaryResourceId}}" { - provider = google-beta name = "{{index $.Vars "cloud_run_service_name"}}" location = "us-central1" deletion_protection = false - launch_stage = "BETA" ingress = "INGRESS_TRAFFIC_ALL" template { containers { diff --git a/mmv1/third_party/terraform/services/cloudrun/resource_cloud_run_service_test.go.tmpl b/mmv1/third_party/terraform/services/cloudrun/resource_cloud_run_service_test.go.tmpl index 6a7972107475..e4318f633b5d 100644 --- a/mmv1/third_party/terraform/services/cloudrun/resource_cloud_run_service_test.go.tmpl +++ b/mmv1/third_party/terraform/services/cloudrun/resource_cloud_run_service_test.go.tmpl @@ -1425,8 +1425,6 @@ resource "google_cloud_run_service" "default" { `, name, project) } - {{ if ne $.TargetVersionName `ga` -}} - func TestAccCloudRunService_emptyDirVolume(t *testing.T) { t.Parallel() @@ -1435,7 +1433,7 @@ func TestAccCloudRunService_emptyDirVolume(t *testing.T) { acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { Config: testAccCloudRunService_cloudRunServiceWithEmptyDirVolume(name, project), @@ -1454,7 +1452,6 @@ func TestAccCloudRunService_emptyDirVolume(t *testing.T) { func testAccCloudRunService_cloudRunServiceWithEmptyDirVolume(name, project string) string { return fmt.Sprintf(` resource "google_cloud_run_service" "default" { - provider = google-beta name = "%s" location = "us-central1" @@ -1462,7 +1459,6 @@ resource "google_cloud_run_service" "default" { namespace = "%s" annotations = { generated-by = "magic-modules" - "run.googleapis.com/launch-stage" = "BETA" } } @@ -1485,7 +1481,6 @@ resource "google_cloud_run_service" "default" { } `, name, project) } - {{- end }} {{ if ne $.TargetVersionName `ga` -}} func TestAccCloudRunService_resourcesRequirements(t *testing.T) {