add a safety check to prevent clobbering non-CDK stacks
See original GitHub issue$ cdk --version 0.34.0 (build 523807c)
By default, the cdk CLI should refuse any command that would mutate a non-cdk stack. For example, {diff
, synth
} should be accepted but {deploy
, destroy
} should be refused. A command line switch and/or declaration in cdk.json
could be implemented to override this check globally and perhaps also per-stack.
A stack could be identified as “CDK managed” by the presence of a resource of type AWS::CDK::Metadata
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to avoid clobbering files when creating a tar archive
I looked at --confirmation and --interactive, but that only asks me if I want to add file x to the archive, not whether...
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 FreeTop 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
Top GitHub Comments
That’s a good observation, and generally your suggestions about IAM reflect best practice BUT they require a bit of advance planning.
My intent here is to suggest a safe guard for avoiding a potentially disruptive outcome: modifying a stack that was never managed by CDK before. Such an operation might be intentional but I believe it’s more likely to happen accidentally. As explained earlier, I believe such a change would be relatively simple to implement.
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.