Deployment Modes: Complete vs Incremental
What you'll learn: How Azure ARM template deployment modes control whether existing resources are preserved or deleted during updates.
The Two Deployment Modes
When you deploy an ARM template to a resource group, Azure gives you two modes that drastically change what happens to resources not defined in your current template:
Incremental Mode (Default): Azure adds or updates resources declared in your template but leaves untouched any existing resources in the resource group that aren't mentioned. Think of this like editing a document—you change what you specify, but everything else stays intact.
Complete Mode: Azure treats your template as the complete desired state of the resource group. It adds/updates declared resources and deletes any resources in the group that aren't in your template. It's like replacing a document entirely—only what you define survives.
When to Use Each Mode
Use Incremental mode for:
- Adding new resources alongside existing ones
- Updating specific resources without affecting others
- Safer, iterative changes in shared resource groups
Use Complete mode for:
- Ensuring strict control over a resource group's contents
- Cleaning up orphaned resources automatically
- Environments where the template is the single source of truth
The Deletion Risk
Complete mode is powerful but dangerous. If you accidentally omit resources from your template, they'll be permanently deleted on deployment. Always validate with --what-if operations before running complete mode deployments.
Key Takeaway: Incremental mode safely updates what you declare while preserving other resources; complete mode enforces your template as the absolute truth and deletes anything not specified—choose wisely based on your control requirements.