Describe the bug
- cdk diff a new stack with a bucket, but the bucket already exists
- changeset created, fails with Resource name conflict (expected)
- no cli output at all - have to go to the console to view or go into verbose mode
- changeset doesn't get deleted, stack stays in "REVIEW IN PROGRESS" state
- cdk diff again, doesn't delete the existing changeset and can't do a proper diff (has to use template)
- the only way to delete the changeset is to go into the console and delete
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
cdk diff deletes the changeset and stack doesn't permanently stay in REVIEW sgtate
Current Behavior
first diff runs with:
[20:50:47] DeploymentError: Early validation failed for change set cdk-diff-change-set:
mystack/bucket/Resource (AWS::S3::Bucket mybucket)
Resource of type 'AWS::S3::Bucket' with identifier 'mybucket' already exists. (at
/Resources/mybucket)
Source Location: ...aws-cdk-lib, jsii runtime, node internals...
(no user code in 10 frames, use --stack-trace-limit to capture more)
Could not create a change set, will base the diff on template differences (run again with -v to see the reason)```
second diff:
[20:55:12] Attempting to create ChangeSet with name cdk-diff-change-set for stack mystack
[20:55:12] AlreadyExistsException: ChangeSet cdk-diff-change-set cannot be created due to a mismatch with existing attribute ClientToken
Could not create a change set, will base the diff on template differences (run again with -v to see the reason)
### Reproduction Steps
1. `cdk diff mystack` with a bucket in the construct with the name that already exists on a bucket somewhere
2. cfn validation fails and stays in review state
3. `cdk diff mystack` again
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.1133.0
### Framework Version
_No response_
### Node.js Version
26.5.0
### OS
macos tahoe 26.5.2
### Language
Python
### Language Version
_No response_
### Other information
would also like to add that i don't see any flag that disables this pre-deployment check
Describe the bug
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
cdk diff deletes the changeset and stack doesn't permanently stay in REVIEW sgtate
Current Behavior
first diff runs with:
[20:55:12] Attempting to create ChangeSet with name cdk-diff-change-set for stack mystack
[20:55:12] AlreadyExistsException: ChangeSet cdk-diff-change-set cannot be created due to a mismatch with existing attribute ClientToken
Could not create a change set, will base the diff on template differences (run again with -v to see the reason)