- Notifications
You must be signed in to change notification settings - Fork1k
chore(examples): update devcontainer-{docker,kubernetes} to use computed env#14328
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
# You could alternatively write the environment variables to a ConfigMap or Secret | ||
# and use that as `env_from`. | ||
dynamic"env" { | ||
for_each=nonsensitive(var.cache_repo==""? local.envbuilder_env: envbuilder_cached_image.cached.0.env_map) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
review: apparently this is required to be able tofor_each
over amap
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes. I previously used it here.
https://github.com/coder/modules/blob/4c45d69994937700f3033f120a489e1c17c1afd6/hcp-vault-secrets/main.tf#L69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This makes sense sinceresource "envbuilder_cached_image" "cached"
has count set to 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice cleanup!
Uh oh!
There was an error while loading.Please reload this page.
Relates to#13278