Skip to content

cdk 2.1.0 synth, diff subcommands fail with "AssertDescription: CDK bootstrap stack version 6 required...". cdk 2.1.0 deploy subcommand succeeds. #17942

@chowlett

Description

@chowlett

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

  1. Upgrade cdk 2.0.0 to 2.1.0
  2. run cdk bootstrap with appropriate credentials
  3. create a new folder and cd to it
  4. create a new cdk project with cdk init --language typescript
  5. cdk synth
  6. cdk diff
  7. 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.

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.effort/mediumMedium work item – several days of effortp1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions