sincecutoff.com
← all changes

cdk deploy --require-approval adds destructive

Introduced 2026-10-08 · score 0.93

HOW TO USE IT

When deploying a stack that may replace, delete, or orphan resources, run `cdk deploy` with `--require-approval=destructive`. The CLI lists affected resources and requires manual confirmation before deploying them.

cdk deploy --require-approval=destructive <StackName>

WHY THIS HELPS

Set the approval requirement when deploying a stack that may include destructive changes.

REQUIREMENTS AND LIMITATIONS

  • Version: 2.1145.0
  • --require-approval: Sets which changes require manual confirmation before deployment; `destructive` requires approval for changes that replace, delete, or orphan existing resources, including resources in nested stacks.
  • destructive: The `--require-approval` value that requires approval for destructive changes. Changes that only broaden permissions do not require approval in this mode.
  • <StackName>: The stack to deploy; the documented `cdk deploy` example supplies a stack name.
  • Prerequisite: The CDK Toolkit CLI requires Node.js or another JavaScript runtime; the documented minimum supported version is Node.js v18.
  • Docs conflict: The current AWS `cdk deploy` reference lists `any-change`, `broadening`, and `never` as valid `--require-approval` values, omitting `destructive`; the version-matched official CLI source documents `destructive`. https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cmd-deploy.html

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card