aws-cdk
aws-cdk copied to clipboard
core: cdk.json "qualifier" ignored
Describe the bug
Setting qualifier attribute in cdk.json appears to not have any impact on running cdk bootstrap as it continues to use the default qualifier.
Expected Behavior
Setting the qualifier attribute in cdk.json should behave the same as running cdk bootstrap --qualifier <QUALIFIER_VALUE>.
Current Behavior
Running cdk bootstrap does not inherit the qualifier value stored in cdk.json
Reproduction Steps
Add a qualifier value to cdk.json:
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"versionReporting": false,
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/core:bootstrapQualifier": "sample-app",
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/aws-iam:minimizePolicies": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"@aws-cdk/core:newStyleStackSynthesis": true
},
"qualifier": "sample-app",
"toolkitStackName": "sample-app-cdk-toolkit"
}
Run cdk bootstrap and observe resources being created using the default qualifier.
Possible Solution
Unkown, I'd assume the CLI should plug in the qualifier value from cdk.json if not explicitly provided as an option to the command.
Additional Information/Context
No response
CDK CLI Version
2.113.0 (build ccd534a)
Framework Version
No response
Node.js Version
v20.9.0
OS
OSX 13.6 (22G120)
Language
TypeScript
Language Version
No response
Other information
No response
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Did you mean cdk bootstrap --qualifier <QUALIFIER_VALUE> works but it just ignores the pre-defined value in cdk.json?
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Did you mean
cdk bootstrap --qualifier <QUALIFIER_VALUE>works but it just ignores the pre-defined value incdk.json?
Yeah, I'd expect it to use the value in cdk.json if the --qualifier option is not provided to the command.
When doing a cdk synth or cdk deploy using the cdk version "2.123.0 (build a594112)", this is being ignored and breaks our deployments:
"context": { "@aws-cdk/core:bootstrapQualifier": "myqualifier", }
Please fix this problem.