Skip to content

Commit 8ef7a20

Browse files
zli82016Dawid212
authored andcommitted
Add default value to env.value to fix the plan diffs in cloud run services (GoogleCloudPlatform#13363)
1 parent ffc1210 commit 8ef7a20

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

mmv1/products/cloudrun/Service.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ properties:
451451
description: Name of the environment variable.
452452
- name: 'value'
453453
type: String
454+
# env is a set.
455+
# The env.value has value "" in Terraform state, but it has value nil in Terraform plan,
456+
# which causes the diffs for unchanged env. default_value: "" is to suppress the diffs.
457+
default_value: ""
454458
description: |-
455459
Defaults to "".
456460
- name: 'valueFrom'

mmv1/products/cloudrunv2/Service.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ properties:
481481
required: true
482482
- name: 'value'
483483
type: String
484+
# env is a set.
485+
# The env.value has value "" in Terraform state, but it has value nil in Terraform plan,
486+
# which causes the diffs for unchanged env. default_value: "" is to suppress the diffs.
487+
default_value: ""
484488
description: |-
485489
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
486490
# exactly_one_of:

0 commit comments

Comments
 (0)