aws / aws/aws-cdk

cdk: Destroy reports success when there is nothing to destroy

Open
#22,240 6 comments 1 reaction 0 assignees View on GitHub
effort/small feature-request good first issue p3 package/tools
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

Configure AWS profile to an account that has not been bootstrapped with cdk.
Run cdk destroy - cdk reports success.

### Expected Behavior

cdk should report an error indicating that the selected stack does not exist.

### Current Behavior

cdk incorrectly reports success in destroying the stack.

### Reproduction Steps

Create a stack, switch accounts. execute: cdk destroy

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.43.1 (build c1ebb85)

### Framework Version

_No response_

### Node.js Version

v16.16.0

### OS

MacOS Monterey

### Language

Typescript

### Language Version

Actually, javascript but drop down does not offer that option

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `cdk destroy` with an AWS profile pointed at an account that has not been bootstrapped, using the reported CDK CLI and Node.js versions if possible. Compare the command's success path with the expected missing-stack error; done means `cdk destroy` reports an error when the selected stack does not exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, typescript
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.