(construct): Private context file & context precedence #14948
Labels
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
effort/large
Large work item – several weeks of effort
feature/enhancement
A new API to make things easier or more intuitive. A catch-all for general feature requests.
feature-request
A feature should be added or improved.
needs-design
This feature request needs additional design work.
needs-discussion
This issue/PR requires more discussion with community.
p1
package/tools
Related to AWS CDK Tools or CLI
Description
Reading through the Runtime Context documentation, a few things jump out at me:
--context
>cdk.context.json
>cdk.json
, however, I have found that setting my context in thecdk.context.json
file gets overwritten by values provided incdk.json
, and both are overridden by the--context
flag. Some clarity on this would be awesome!tryGetContext
looks for (e.g.private.cdk.context.json
, for example), or the ability to pass a file in via a--context-file
flagUse Case
Let's say I am working with an open-source implementation of the CDK, such as the AWS Video on Demand implementation (which I am currently porting from CloudFormation to the CDK). In this instance, I may want to have my own runtime context variables that overwrite the defaults but do not belong in source control (overwriting the
cdk.json
file means that I need to stash my changes to pull updates from upstream, and even then I run the risk of discrepancies).Proposed Solution
Provide either of the following:
private.cdk.context.json
) and will never be altered with cached values, or--context-file
)Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: