-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.
Description
I have a Cloud Run resource that has some environment variables that are defined during an application deployment that takes place within a Cloud Build job.
The issue I have is that any time a new Terraform plan is triggered, the environment variables not defined in the resource are destroyed.
I'd ideally like to not have to manage this particular environment variable in Terraform and isolate the application layer like I am right now.
The docs make reference to inheritance and variable expansion, but as far as I can tell that doesn't work is not applicable to fully managed cloud run.
New or Affected Resource(s)
- google_cloud_run_service
Potential Terraform Configuration
I think the simplest change would to just make it so that if an env is defined without a value, the value is just inherited from the previous state. If someone explicitly wants a blank value, they can set the value to ""
References
- Community Slack Discussion
- b/272366353