Skip to content

Add default value to env.value to fix the plan diffs in cloud run services #9572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/13363.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:bug
cloudrun: fixed the perma-diffs for unchanged `template.spec.containers.env` in `google_cloud_run_service` resource
```
```release-note:bug
cloudrunv2: fixed the perma-diffs for unchanged `template.containers.env` in `google_cloud_run_v2_service` resource
```
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ func cloudrunServiceSpecTemplateSpecContainersContainersEnvSchema() *schema.Reso
Type: schema.TypeString,
Optional: true,
Description: `Defaults to "".`,
Default: "",
},
"value_from": {
Type: schema.TypeList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@ func cloudrunv2ServiceTemplateContainersContainersEnvSchema() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Description: `Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.`,
Default: "",
},
"value_source": {
Type: schema.TypeList,
Expand Down
Loading