-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
What is the problem?
cdk synth and cdk diff fail with "AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." after the template checks SSM for version not 1-5. The actual version in SSM is 9.
cdk deploy succeeds.
After the successful cdk deploy, the synth and diff continue to fail.
Reproduction Steps
- Upgrade cdk 2.0.0 to 2.1.0
- run cdk bootstrap with appropriate credentials
- create a new folder and cd to it
- create a new cdk project with
cdk init --language typescript - cdk synth
- cdk diff
- cdk deploy
What did you expect to happen?
A clean synth with no errors displayed
A clean diff with no errors displayed
A clean deploy with no errors displayed
What actually happened?
for synth and diff
...
Rules:
CheckBootstrapVersion:
Assertions:
- Assert:
Fn::Not:
- Fn::Contains:
- - "1"
- "2"
- "3"
- "4"
- "5"
- Ref: BootstrapVersion
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.
for deploy - a clean, error-free execution with a CFn template produced as expected.
CDK CLI Version
2.1.0
Framework Version
2.0.0
Node.js Version
16.10.0
OS
macOS Monterey (12.0.1)
Language
Typescript
Language Version
TypeScript 4.2.4
Other information
The bootstrap CDKToolkit stack looks as expected - all of the modern template trappings (the previous bootstrap was legacy). The value of the SSM parameter /cdk-bootstrap/hnb659fds/version is 9, as expected. The cdk-hnb659fds-deploy-role-<account>-<region> role has the appropriate ssm:GetParameter permission for .../cdk-bootstrap/hnb659fds/version. the cdk-hnb659fds-lookup-role-<account>-<region> role has ssm:Get* permission for *.
"old" cdk projects continue to function as expected with cdk synth etc.
Hoping you can deduce some bozo thing I must have overlooked or done. Thanks for whatever help you can provide.