sincecutoff.com
← all changes

ARM adds deployment stacks what-if commands

Introduced 2026-08-04 · score 0.94

HOW TO USE IT

When previewing a deployment stack change, run `az stack-whatif <scope> create` at its resource group, subscription, or management group scope, supplying the stack ID and required scope settings. The command creates a deployment stack what-if result.

az stack-whatif group create --name <result-name> --resource-group <resource-group> --template-file <template-file> --deny-settings-mode none --action-on-unmanage deleteResources --ri P5D --stack-id <stack-resource-id>
az stack-whatif sub create --name <result-name> --template-file <template-file> --location <location> --deny-settings-mode none --action-on-unmanage deleteResources --ri P5D --stack-id <stack-resource-id>
az stack-whatif mg create --name <result-name> --template-file <template-file> --location <location> --management-group-id <management-group-id> --deny-settings-mode none --action-on-unmanage deleteResources --ri P5D --stack-id <stack-resource-id>

WHY THIS HELPS

Preview a deployment stack change before applying it.

REQUIREMENTS AND LIMITATIONS

  • Version: 2.89.0
  • --name (required): Name for the what-if result.
  • --resource-group (required): Resource group scope for the result.
  • --management-group-id (required): Management group scope for the result.
  • --location (required): Location for the subscription- or management-group-scope result.
  • --stack-id (required): Resource ID of the deployment stack being previewed.
  • --action-on-unmanage / --aou (required): Action for resources removed from the stack: deleteAll, deleteResources, or detachAll.
  • --deny-settings-mode / --dm (required): Deny settings mode: denyDelete, denyWriteAndDelete, or none.
  • --retention-interval / --ri (required): Retention interval for the what-if result.
  • --template-file: Path to the template file; create also accepts --template-spec or --template-uri.
  • --parameters: Template parameters, including parameter files and key/value pairs.
  • Prerequisite: Azure CLI 2.89.0 or later is required for `az stack-whatif`.

FIRST-PARTY EVIDENCE

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

Report a problem with this card