cli: add a --confirm-diff
option to cdk deploy
#32094
Labels
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
package/tools
Related to AWS CDK Tools or CLI
Describe the feature
One nice thing about the Pulumi cli is that it gives you the full diff for any deployment to confirm before proceeding.
AFAICT the
cdk deploy
cli only gives the option to confirm "security-sensitive" changes such as IAM policies etc.I would like an option to show the
cdk diff
output first, with a confirmation step.Use Case
It's possible to do this manually, I could write a bash script that first runs
cdk diff
then gets confirmation then runscdk deploy
.However due to #27991 this would be even more painfully slow than it already is, because every time I run a separate cdk cli command it does several uncached Docker builds. It takes like 5 mins per command... life is too short!
My particular use-case is to avoid issues such as this #7722 where the deployment triggered unexpected non-security-sensitive updates due to stale SSM params in the context json.
Proposed Solution
Add a
--confirm-diff
option tocdk deploy
command that gives the output ofcdk diff
with a confirmation step before proceeding with the deploy.Another option might be to extend the options for the existing
--require-approval
flag, but given it currently has[choices: "never", "any-change", "broadening"]
that's probably more confusing.Other Information
No response
Acknowledgements
CDK version used
2.166.0 (build 7bb9203)
Environment details (OS name and version, etc.)
macos 14
The text was updated successfully, but these errors were encountered: