-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(aws-cdk): cdk bootstrap prints YAML template even when using --json option #21456
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
Describe the bug
OK, I'm either stupid and I'm missing something obvious or the command --show-template doesn't behave like it should.
The below commands are always printing the same template for me:
$ cdk bootstrap --show-template > x
$ cdk bootstrap --show-template --bootstrap-kms-key-id=AWS_KEY_MANAGED > x2
$ cdk bootstrap --show-template --bootstrap-customer-key > x3
$ cdk bootstrap --show-template --bootstrap-customer-key asd > x4
$ cdk bootstrap --show-template --json > x5
$ diff x*
$
(no output, same files)Why? There is no --dry-run- option, so I expect to be able to see the template modified with the CLI options to validate before actual deployment. Instead, even -j does not have any effect whatsoever for me. Am I missing something?
Also, in the template I see that it's possible to use AWS_MANAGED_KEY for FileAssetsBucketKmsKeyId.
Shouldn't this be possible to enable this via CLI (and be documented in cdk bootstrap -h) ?
I even tried to do the following:
cdk bootstrap --show-template > template- (edited the template file and set FileAssetsBucketKmsKeyId to AWS_MANAGED_KEY
cdk bootstrap --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess aws://XXX/eu-west-1 --template template --no-execute
Result:
CDKToolkit: creating CloudFormation changeset... Environment bootstrapped (no changes).- CloudFormation shows an empty and FAILED changeset.
CDK CLI Version
2.35.0 (build 5c23578)
Framework Version
No response
Node.js Version
v14.19.3
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI