Aws-cdk: Add stage and parameter file for stage

Created on 13 Sep 2019  路  3Comments  路  Source: aws/aws-cdk

Might be addressed by #1499

:rocket: Feature Request

General Information

  • [x] :wave: I may be able to implement this feature request
  • [x] :warning: 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

closing-soon feature-request packagtools

Most helpful comment

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

All 3 comments

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

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

@mirazmamun

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nzspambot picture nzspambot  路  3Comments

abelmokadem picture abelmokadem  路  3Comments

kawamoto picture kawamoto  路  3Comments

artyom-melnikov picture artyom-melnikov  路  3Comments

eladb picture eladb  路  3Comments