sincecutoff.com
← all changes

CDK CLI adds --revert-drift option

Introduced 2026-03-09 · score 0.94

HOW TO USE IT

When reconciling out-of-band resource changes with CDK template definitions, deploy the affected stack with the drift-aware change set option. Run `cdk deploy <stack> --revert-drift`.

cdk deploy <stack> --revert-drift

WHY THIS HELPS

When reconciling actual resource state with CDK template definitions, use the CLI drift-revert option.

REQUIREMENTS AND LIMITATIONS

  • Version: 2.1110.0
  • <stack>: CDK stack ID to deploy; omit to deploy according to the app's stack selection behavior.
  • --revert-drift: Uses a CloudFormation `REVERT_DRIFT` change set to detect out-of-band drift and revert resources to their template-defined state. Default: false.
  • Prerequisite: CDK CLI and a CDK app with the target stack. If the AWS environment is not bootstrapped, only stacks without assets and with synthesized templates under 51,200 bytes can successfully deploy.

FIRST-PARTY EVIDENCE

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

Report a problem with this card