CLI: `cdk deploy` should destroy stacks that have been removed from the app
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 122
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 71
Description
## :question: General Issue
### The Question
cdk deploy leaves stack deployed if a stack is removed from application post deployment and cdk app is deployed again.
**Steps to Reproduce**
1. Create a CDK app with two stacks
1. Run: `cdk deploy --all`
1. Delete one stack from the CDK app
1. Run: `cdk deploy --all`
**Expected Results**
The deleted stack is gone.
**Actual Results**
The deleted stack exists and has been "leaked".
i.e. the stacks are procedural rather than declarative. This doesn't fit into a managed pipeline model as stacks will accidentally leak and have to be manually cleaned, while the behavior makes sense if you're familiar with the implementation details of CDK, this isn't the right developer experience.
### Environment
- **CDK CLI Version:** 1.73.0
- **Module Version:**
- **Node.js Version:** 12.x and 15.2.0
- **OS:** macOS Mojave and CodeBuild Ubuntu (not used other OSes)
- **Language (Version):** TypeScript (4.0.7)
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.