ARM templates

What it is

An ARM template is a JSON file that declaratively describes Azure resources, their properties, and their relationships. Azure Resource Manager reads it and performs a deployment at the selected scope. It gives a team a repeatable record of intended infrastructure, but the exact update and deletion behavior depends on the resource types and deployment mode.

Why it exists

Clicking through the Portal or imperative CLI is fine for one resource but not reproducible or auditable for a fleet. Templates make infrastructure code: versioned in git, reviewed, reused with parameters, and safely re-run (no surprise re-provisions).

Key ideas

  • The resources section describes the Azure resources to deploy. Parameters and outputs let one template be reused and connected to other deployment steps.
  • Templates can deploy at resource-group, subscription, management-group, or tenant scope. Scope determines which resource types and governance settings can be targeted.
  • Incremental deployment updates or adds declared resources but does not automatically delete every resource omitted from the template. Complete-mode behavior can remove undeclared resources at the deployment scope and must be treated as potentially destructive.
  • Bicep is the modern Azure-native authoring language that compiles to ARM JSON. Use either deliberately; do not assume exported portal JSON is a production-ready design.

Northwind example

Northwind deploys an ARM template at the orders-production resource-group scope. The template declares the ordering app and storage settings, while parameters provide the production name and region. Before changing a resource, the team reviews the template change and deployment impact. It does not use complete mode casually, because an omitted resource at that scope could be deleted.

Common confusion

  • ARM template is the JSON definition; Azure Resource Manager is the service that executes it.
  • A template is not a backup. It can recreate infrastructure configuration, but data recovery needs an appropriate backup and restore plan.
  • Declarative does not eliminate the need for permission, Policy compliance, quotas, capacity, or review of destructive changes.

How it fits (diagram)

Exam notes

  • ARM template vs MPI (managed identity): not related — templates are IaC.
  • Incremental vs complete deployment modes: incremental only adds/changes listed resources; complete deletes resources in the RG not in the template (dangerous — default is incremental).
  • Linked/nested templates with deployments resource for modularity.
  • Exam: recognize template JSON anatomy and that it’s declarative + idempotent.

bicep · infrastructure-as-code · azure-cli · azure-vm · arm · northwind-traders-case-study

📘 Source: Microsoft Learn — What are ARM templates?, checked 2026-09-16.