Skip to content

Commit b8e703b

Browse files
authored
cloudrunv2: promote mount options for GcsFuse volumes to GA (#15154)
1 parent 4f655ed commit b8e703b

File tree

6 files changed

+60
-72
lines changed

6 files changed

+60
-72
lines changed

mmv1/products/cloudrunv2/Job.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ properties:
670670
If true, mount this volume as read-only in all mounts. If false, mount this volume as read-write.
671671
- name: 'mountOptions'
672672
type: Array
673-
min_version: 'beta'
674673
description: |
675674
A list of flags to pass to the gcsfuse command for configuring this volume.
676675
Flags should be passed without leading dashes.

mmv1/products/cloudrunv2/Service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ properties:
929929
description: If true, mount the GCS bucket as read-only
930930
required: false
931931
- name: 'mountOptions'
932-
min_version: 'beta'
933932
type: Array
934933
description: |
935934
A list of flags to pass to the gcsfuse command for configuring this volume.

mmv1/products/cloudrunv2/WorkerPool.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,6 @@ properties:
593593
description: If true, mount the GCS bucket as read-only
594594
required: false
595595
- name: 'mountOptions'
596-
min_version: 'beta'
597596
type: Array
598597
description: |
599598
A list of flags to pass to the gcsfuse command for configuring this volume.

mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_job_test.go.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,7 @@ func testAccCloudRunV2Job_cloudrunv2JobWithGcsVolume(context map[string]interfac
388388
gcs {
389389
bucket = "gcp-public-data-landsat"
390390
read_only = true
391-
{{ if ne $.TargetVersionName `ga` -}}
392-
mount_options = ["log-severity=info"]
393-
{{ end }}
391+
mount_options = ["log-severity=info"]
394392
}
395393
}
396394
}

mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_service_test.go.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,7 @@ resource "google_cloud_run_v2_service" "default" {
343343
gcs {
344344
bucket = "gcp-public-data-landsat"
345345
read_only = true
346-
{{ if ne $.TargetVersionName `ga` -}}
347-
mount_options = ["log-severity=info"]
348-
{{ end }}
346+
mount_options = ["log-severity=info"]
349347
}
350348
}
351349
containers {

mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_worker_pool_test.go.tmpl renamed to mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_worker_pool_test.go

Lines changed: 58 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
"github.com/hashicorp/terraform-provider-google/google/acctest"
9-
"github.com/hashicorp/terraform-provider-google/google/envvar"
9+
"github.com/hashicorp/terraform-provider-google/google/envvar"
1010
)
1111

1212
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolFullUpdate(t *testing.T) {
@@ -43,7 +43,6 @@ func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolFullUpdate(t *testing.T) {
4343
})
4444
}
4545

46-
4746
func testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolFull(context map[string]interface{}) string {
4847
return acctest.Nprintf(`
4948
resource "google_cloud_run_v2_worker_pool" "default" {
@@ -163,7 +162,7 @@ resource "google_service_account" "service_account" {
163162
}
164163
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolGcsVolume(t *testing.T) {
165164
acctest.SkipIfVcr(t)
166-
t.Parallel()
165+
t.Parallel()
167166

168167
context := map[string]interface{}{
169168
"random_suffix": acctest.RandString(t, 10),
@@ -182,8 +181,8 @@ func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolGcsVolume(t *testing.T) {
182181
ImportState: true,
183182
ImportStateVerify: true,
184183
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
185-
},
186-
},
184+
},
185+
},
187186
})
188187
}
189188

@@ -219,9 +218,7 @@ resource "google_cloud_run_v2_worker_pool" "default" {
219218
gcs {
220219
bucket = "gcp-public-data-landsat"
221220
read_only = true
222-
{{ if ne $.TargetVersionName `ga` -}}
223-
mount_options = ["log-severity=info"]
224-
{{ end }}
221+
mount_options = ["log-severity=info"]
225222
}
226223
}
227224
containers {
@@ -263,7 +260,7 @@ func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithDirectVPCUpdate(t *test
263260
workerPoolName := fmt.Sprintf("tf-test-cloudrun-worker-pool%s", acctest.RandString(t, 10))
264261
context := map[string]interface{}{
265262
"service_name": workerPoolName,
266-
"project": envvar.GetTestProjectFromEnv(),
263+
"project": envvar.GetTestProjectFromEnv(),
267264
}
268265

269266
acctest.VcrTest(t, resource.TestCase{
@@ -346,7 +343,7 @@ resource "google_cloud_run_v2_worker_pool" "default" {
346343
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudienceUpdate(t *testing.T) {
347344
t.Parallel()
348345

349-
workerPoolName := fmt.Sprintf("tf-test-cloudrun-worker-pool%s", acctest.RandString(t, 10))
346+
workerPoolName := fmt.Sprintf("tf-test-cloudrun-worker-pool%s", acctest.RandString(t, 10))
350347

351348
acctest.VcrTest(t, resource.TestCase{
352349
PreCheck: func() { acctest.AccTestPreCheck(t) },
@@ -362,7 +359,7 @@ func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudienceUpdate(t *tes
362359
ImportStateVerify: true,
363360
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "launch_stage", "deletion_protection"},
364361
},
365-
{
362+
{
366363
Config: testAccCloudRunV2WorkerPool_cloudRunWorkerPoolUpdateWithCustomAudience(workerPoolName, "test_update"),
367364
},
368365
{
@@ -419,7 +416,6 @@ resource "google_cloud_run_v2_worker_pool" "default" {
419416
`, workerPoolName, customAudience)
420417
}
421418

422-
423419
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolAttributionLabel(t *testing.T) {
424420
t.Parallel()
425421

@@ -523,36 +519,35 @@ resource "google_cloud_run_v2_worker_pool" "default" {
523519
}
524520

525521
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualScaling(t *testing.T) {
526-
t.Parallel()
527-
context := map[string]interface{} {
528-
"random_suffix" : acctest.RandString(t, 10),
529-
}
530-
acctest.VcrTest(t, resource.TestCase {
531-
PreCheck: func() { acctest.AccTestPreCheck(t)},
532-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
533-
CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t),
534-
Steps: []resource.TestStep{
535-
{
536-
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualScaling(context),
537-
},
538-
{
539-
ResourceName: "google_cloud_run_v2_worker_pool.default",
540-
ImportState: true,
541-
ImportStateVerify: true,
542-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
543-
},
544-
{
545-
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolUpdateWithManualScaling(context),
546-
},
547-
{
548-
ResourceName: "google_cloud_run_v2_worker_pool.default",
549-
ImportState: true,
550-
ImportStateVerify: true,
551-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
552-
},
553-
554-
},
555-
})
522+
t.Parallel()
523+
context := map[string]interface{}{
524+
"random_suffix": acctest.RandString(t, 10),
525+
}
526+
acctest.VcrTest(t, resource.TestCase{
527+
PreCheck: func() { acctest.AccTestPreCheck(t) },
528+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
529+
CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t),
530+
Steps: []resource.TestStep{
531+
{
532+
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualScaling(context),
533+
},
534+
{
535+
ResourceName: "google_cloud_run_v2_worker_pool.default",
536+
ImportState: true,
537+
ImportStateVerify: true,
538+
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
539+
},
540+
{
541+
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolUpdateWithManualScaling(context),
542+
},
543+
{
544+
ResourceName: "google_cloud_run_v2_worker_pool.default",
545+
ImportState: true,
546+
ImportStateVerify: true,
547+
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
548+
},
549+
},
550+
})
556551
}
557552

558553
func testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualScaling(context map[string]interface{}) string {
@@ -617,26 +612,26 @@ resource "google_cloud_run_v2_worker_pool" "default" {
617612
}
618613

619614
func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualInstanceCountZero(t *testing.T) {
620-
t.Parallel()
621-
context := map[string]interface{} {
622-
"random_suffix" : acctest.RandString(t, 10),
623-
}
624-
acctest.VcrTest(t, resource.TestCase {
625-
PreCheck: func() { acctest.AccTestPreCheck(t)},
626-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
627-
CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t),
628-
Steps: []resource.TestStep{
629-
{
630-
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualInstanceCountZero(context),
631-
},
632-
{
633-
ResourceName: "google_cloud_run_v2_worker_pool.default",
634-
ImportState: true,
635-
ImportStateVerify: true,
636-
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
637-
},
638-
},
639-
})
615+
t.Parallel()
616+
context := map[string]interface{}{
617+
"random_suffix": acctest.RandString(t, 10),
618+
}
619+
acctest.VcrTest(t, resource.TestCase{
620+
PreCheck: func() { acctest.AccTestPreCheck(t) },
621+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
622+
CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t),
623+
Steps: []resource.TestStep{
624+
{
625+
Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualInstanceCountZero(context),
626+
},
627+
{
628+
ResourceName: "google_cloud_run_v2_worker_pool.default",
629+
ImportState: true,
630+
ImportStateVerify: true,
631+
ImportStateVerifyIgnore: []string{"name", "location", "annotations", "labels", "terraform_labels", "launch_stage", "deletion_protection"},
632+
},
633+
},
634+
})
640635
}
641636

642637
func testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolWithManualInstanceCountZero(context map[string]interface{}) string {
@@ -668,4 +663,4 @@ resource "google_cloud_run_v2_worker_pool" "default" {
668663
}
669664
670665
`, context)
671-
}
666+
}

0 commit comments

Comments
 (0)