Template Deployment Modes
What you'll learn: How Azure ARM templates can deploy resources in two distinct modes—incremental and complete—and why choosing the right one protects or replaces your existing infrastructure.
When you deploy an ARM template to Azure, you must choose a deployment mode that determines how the template interacts with resources already in the target resource group. This choice has major consequences for your existing infrastructure.
Incremental Mode (Default)
Incremental mode is the safe, additive approach. When you deploy a template:
- Adds resources declared in the template that don't yet exist
- Updates resources that already exist but have changed properties
- Leaves untouched any resources in the resource group that aren't mentioned in the template
Think of it like editing a document: you add new paragraphs and modify existing ones, but you don't delete paragraphs you didn't specifically mention.
Use incremental when: You're adding new resources or updating specific ones without disturbing the rest of your infrastructure.
Complete Mode
Complete mode is the replace and reconcile approach. When you deploy:
- Adds or updates resources declared in the template
- Deletes any resources in the resource group that aren't in the template
Imagine renovating a room: complete mode throws out everything not on your blueprint and rebuilds from your template. It enforces exact state matching.
Use complete when: You want the resource group to contain only what's in your template—nothing more, nothing less. This is powerful for enforcing compliance but dangerous if you're not careful.
Choosing Wisely
Most production deployments use incremental mode to avoid accidental deletions. Complete mode suits isolated environments where you control all resources through a single template.
Key Takeaway: Incremental mode adds and updates safely; complete mode deletes anything not in your template. Always verify your mode before deploying to production.