Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Aug 16, 2024

Relates to #13278

@johnstcn johnstcn self-assigned this Aug 16, 2024
# 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)
Copy link
Member Author

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 to for_each over a map 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense since resource "envbuilder_cached_image" "cached" has count set to 1.

@johnstcn johnstcn changed the title chore(exmaples): update devcontainer-{docker,kubernetes} to use computed env chore(examples): update devcontainer-{docker,kubernetes} to use computed env Aug 16, 2024
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@johnstcn johnstcn merged commit 40baa5b into main Aug 20, 2024
31 checks passed
@johnstcn johnstcn deleted the cj/examples/devcontainer-computed-env branch August 20, 2024 09:47
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants