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

Add stage and parameter file for stage #4056

Closed
2 tasks done
mirazmamun opened this issue Sep 13, 2019 · 3 comments
Closed
2 tasks done

Add stage and parameter file for stage #4056

mirazmamun opened this issue Sep 13, 2019 · 3 comments
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. package/tools Related to AWS CDK Tools or CLI

Comments

@mirazmamun
Copy link

Might be addressed by #1499

🚀 Feature Request

General Information

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

Description

I am proposing a feature to define the stage status of the infrastructure. This will help contextualize and isolate the set of infrastructure targeted for different environment. It will allow authors of IaC to contain the changes within the context of the stage and allow reproducing the target infrastructures or modifying the incrementally as long as they are in the same stage.

Additionally it will drive the practice of separating the parameter for the stages to be fed from text files and keep them outside of VCS for better security and make the workflow stateless.

Proposed Solution

Here are my mind dumps:

  • Have a CLI option like cdk synth --stage [dev|staging|prod] which will set the app level or stack level Environment property called stage. Or stage can be set from Stack instance property of Environment using @aws-cdk/core.Environment interface
  • It can support reading a stage specific parameter input file following convention pattern like stage prod would read prod.yml file or any file defined by --stage-file CLI option. This will then inject it into stack properties

Environment

  • CDK CLI Version: 1.8.0
  • Module Version: NA
  • OS: all
  • Language: all

Other information

NA

@mirazmamun mirazmamun added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 13, 2019
@eladb
Copy link
Contributor

eladb commented Sep 13, 2019

Any reason --context stage=prod and this.tryGetContext('stage') can't be used to this purpose?

@SomayaB SomayaB added the package/tools Related to AWS CDK Tools or CLI label Sep 13, 2019
@SomayaB SomayaB added status/needs-response and removed needs-triage This issue or PR still needs to be triaged. labels Sep 13, 2019
@NGL321 NGL321 added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed status/needs-response labels Sep 16, 2019
@SomayaB
Copy link
Contributor

SomayaB commented Oct 17, 2019

Any reason --context stage=prod and this.tryGetContext('stage') can't be used to this purpose?

@mirazmamun

@SomayaB SomayaB added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Oct 29, 2019
@SomayaB
Copy link
Contributor

SomayaB commented Nov 1, 2019

I will close this issue since there hasn't been activity on it in a while and it seems to have been resolved by the above comment. Feel free to reopen.

@SomayaB SomayaB closed this as completed Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants