feature flags should be defined in code not context #20190
Labels
@aws-cdk/core
Related to core CDK functionality
effort/large
Large work item – several weeks of effort
feature-request
A feature should be added or improved.
Describe the feature
Currently, AWS CDK uses feature flags defined in cdk.json to opt into or out of certain behavior. However, because these flags are applied globally to the entire app, they inevitably lead to a poor developer experience.
First, they are not easily discoverable. For example, the documentation for
UsagePlan
does not mention theusagePlanKeyOrderInsensitiveId
feature flag, which tends to be necessary when upgrading from v1 to v2.Second, because they get applied to the entire app instead of individual constructs, once an app is "tainted" there is no way to change the behavior even for new constructs. By extension, I cannot move a stack from one app to another if the relevant feature flags between the two apps are different.
I request that the concept of feature flags within cdk.json be deprecated. Instead, these should be handled in a first-class way inside the CDK code. At minimum, I should be able to define them at the app, stage, and stack level.
Use Case
See above.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.20.0
Environment details (OS name and version, etc.)
Alpine 3.15
The text was updated successfully, but these errors were encountered: