Skip to content

Commit

Permalink
feat: move emptydir to GA for cloudrun and cloudrunv2 (GoogleCloudPla…
Browse files Browse the repository at this point in the history
  • Loading branch information
bskaplan authored Nov 4, 2024
1 parent 151f8f2 commit 8a6f281
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion mmv1/products/cloudrun/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions mmv1/products/cloudrunv2/Job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions mmv1/products/cloudrunv2/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1425,8 +1425,6 @@ resource "google_cloud_run_service" "default" {
`, name, project)
}

{{ if ne $.TargetVersionName `ga` -}}

func TestAccCloudRunService_emptyDirVolume(t *testing.T) {
t.Parallel()

Expand All @@ -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),
Expand All @@ -1454,15 +1452,13 @@ 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"

metadata {
namespace = "%s"
annotations = {
generated-by = "magic-modules"
"run.googleapis.com/launch-stage" = "BETA"
}
}

Expand All @@ -1485,7 +1481,6 @@ resource "google_cloud_run_service" "default" {
}
`, name, project)
}
{{- end }}

{{ if ne $.TargetVersionName `ga` -}}
func TestAccCloudRunService_resourcesRequirements(t *testing.T) {
Expand Down

0 comments on commit 8a6f281

Please sign in to comment.