cdk.star¶
Set AWS CDK context values, such as feature flags, in cdk.json.
Edits keep cdk.json's key order and indentation. The aws-cdk-lib version
itself lives in package.json, pyproject.toml, pom.xml or go.mod; use
npm.set_dependency, python.set_requirement, maven.set_dependency or a
go get step for it.
| Function | What it does |
|---|---|
apps |
Lists the repo's CDK apps. |
set_context |
Sets a context value, such as a feature flag, in every cdk.json. |
apps¶
Lists the repo's CDK apps.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
Returns: The sorted paths of every cdk.json outside node_modules and cdk.out.
Example
set_context¶
Sets a context value, such as a feature flag, in every cdk.json.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
key |
The context key, such as @aws-cdk/aws-lambda:recognizeLayerVersion. |
value |
Any JSON value. |
only_existing |
When True, only apps that already set the key change. |
Returns: The list of paths that changed.
Example
Used in: cdk-feature-flags