Skip to content

[envsec] Add environment flag #1679

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 3 commits into from
Dec 11, 2023
Merged

[envsec] Add environment flag #1679

merged 3 commits into from
Dec 11, 2023

Conversation

mikeland73
Copy link
Contributor

Summary

Adds new --environment flag that gets passed in to envsec.

A few notes:

  • This flag is present in any command that allows a custom config path. The idea is that in the future users can add per environment configuration to their devbox.json
  • This PR validates in devbox.Open instead of CLI. This can probably be moved up to CLI code but this would have bloated this PR.
  • Related, the way we pass options to devbox.Open is very brittle. It involves a lot of copy paste that is easy to mess up. We should look to refactor that, maybe in a follow up.

How was it tested?

devbox run --environment prod echo $SECRET

@mikeland73 mikeland73 merged commit 13f558b into main Dec 11, 2023
@mikeland73 mikeland73 deleted the landau/environment branch December 11, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants