We are using environments to manage Docker image t...
# esc
d
We are using environments to manage Docker image tags for use in our deployments. Currently our flow for deployment is: 1. Update the environment 2. Run
pulumi preview
(in CI) 3. Review the preview diff 4. Apply to production if everything looks good The problem here is that if (3) doesn't look good or the release is aborted for some reason, the change from (1) still remains, which can be confusing and lead to issues in future operations. Is there a way to override a value pulled from an environment just for the scope of a particular
preview
calculation, and leave the actual environment unchanged? Or some other way to avoid this scenario.
s
I'm not 100% sure on the override behavior, but I think an explicit config value will override one from an environment. Another approach would be to use ESC Environment versions, but that might defeat the point of what you're trying to do. Are you trying to do (current Environment + next version of the container)?
d
Are you trying to do (current Environment + next version of the container)?
Yes, that's correct
I'm not 100% sure on the override behavior, but I think an explicit config value will override one from an environment.
For it, so instead of changing the environment in the CI job, we just locally override the config when doing the "preview". If that works that makes sense!
s
Is a local config value correctly overriding one from an ESC environment?
"correct" meaning "doing what you want it to do" not necessarily "ESC's behavior" (because I'm not sure if that is the intended behavior)
Confirmed, btw: local stack config always overrides an environment. I also submitted an issue b/c it's not documented.
Feel free to comment or upvote: https://github.com/pulumi/docs/issues/14131
d
Thanks! I had some time today to try this out and it's working for us! I'm seeing the same precedence behavior as you called out. Agreed that better docs here would be quite useful!