Skip to content
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

(cdk --context): add a --context-override flag for parameters #16026

Closed
2 tasks
ahoffmanzotec opened this issue Aug 12, 2021 · 2 comments
Closed
2 tasks

(cdk --context): add a --context-override flag for parameters #16026

ahoffmanzotec opened this issue Aug 12, 2021 · 2 comments
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@ahoffmanzotec
Copy link

when using synth or deploy on a project that has an existing cdk.context.json file, the values entered in via the command line from the --context key=value should overwrite/override the existing values in the file if the --context-override flag is added.

Use Case

Allows for easier development of deploy pipelines in other products (like azure). Currently all of the values in the cdk.context.json file have to be updated via file manipulation. So if I have dedicated vpcs, kms keys, etc per environment or I have naming structures for resources that are based on environment naming, having those values in the context makes having dynamic stacks easier to create. However, currently all values in the cdk.context.json file must be updated via file manipulation, which is more work than necessary and a simple flag to indicate those existing values should be overwritten/overrode during synth/deploy time makes the most sense.

Proposed Solution

add a --context-override flag so identically keyed context pairs are overridden by parameters passed via cli instead of having the cdk.context.json file be the "arbiter of truth".

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ahoffmanzotec ahoffmanzotec added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 12, 2021
@peterwoodworth
Copy link
Contributor

Hey @ahoffmanzotec, sorry for the long response time here.

#14948 is a similar issue, so I'll be closing this issue in favor of it. Please give it a thumbs up, and leave a comment too if you'd like 😄

@github-actions
Copy link

github-actions bot commented Oct 6, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants