CLI: cdk destroy behavior
See original GitHub issue❓ General Issue
The Question
Suppose I am using Cloud9 in us-west-2 and I deploy to us-east-1 by setting the environment variable in the Stack Constructor. Later I remove the explicit environment identifier and then run cdk destroy
, CDK will look in us-west-2 for the stack and claim the deletion was successful even though it didn’t delete anything. Should CDK throw an error or prompt the user if cdk destroy [STACK_NAME]
doesn’t find a stack with the right name.
Environment
- CDK CLI Version: 1.29.0
- Module Version: N/A
- OS: Amazon Linux
- Language: Python
Other information
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
AWS CDK Toolkit (cdk command) - AWS Documentation
The AWS CDK Toolkit, the CLI command cdk , is the primary tool for interacting with your AWS CDK app. It executes your...
Read more >How to Delete a CDK Stack in AWS CDK | bobbyhadz
We set the bucket's removalPolicy property to DESTROY , which means that if the bucket is empty when we delete the CDK stack,...
Read more >Clean up | AWS CDK Workshop
If you would like to delete this stack, it will have to be done through the CloudFormation console. Head over to the CloudFormation...
Read more >cdk deploy / destroy seem to ignore profile - AWS re:Post
There does appear to be a difference in behavior between the AWS CLI and CDK when it comes to handling of the config...
Read more >AWS CDK Toolkit - npm
cdk deploy, Deploy a stack into an AWS account ; cdk watch, Watches a CDK app for deployable and hotswappable changes ; cdk...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would very much support an option for this, just ran into this in our CI pipelines. CDK reports a certain stack was destroyed except said stack never existed the first place. It feels misleading however I look at it.
still an issue