ARM templates and Bicep in 60 seconds
Management & GovernanceInfrastructure as codeAWS: AWS CloudFormation
What it is
Declarative files that describe Azure resources. Azure Resource Manager deploys them the same way every time, with what-if previews, Incremental or Complete modes and a deployment history per resource group.
Simulate it »✅ Use it when
- Repeatable environments (dev, test, prod)
- Reviewing infrastructure changes in pull requests
- Rebuilding resources after an incident
🚫 Not the best fit when
- One-off experiments you will delete in an hour
💰 Price feel: ●○○○ Free or very cheap
Free. You pay only for the resources the template creates.
Illustrative pay-as-you-go list prices at approximate exchange rates. Use the Azure pricing calculator for real quotes.
Simulate it
🖱️ Drag to rotate · scroll or pinch to zoom
A Bicep file becomes resources
A template has four parts: parameters (inputs such as storageName and skuName), variables (values worked out once), resources (what gets built) and outputs (values handed back). The CLI compiles Bicep to ARM JSON and Azure Resource Manager validates it, then builds it.
🤔 What happens if…
Read this tour as text
- A Bicep file becomes resources. A template has four parts: parameters (inputs such as
storageNameandskuName), variables (values worked out once), resources (what gets built) and outputs (values handed back). The CLI compiles Bicep to ARM JSON and Azure Resource Manager validates it, then builds it. - what-if, Incremental and Complete. what-if previews the changes (
+create,~modify,-delete) without touching anything. Incremental mode, the default, adds and updates. Complete mode also deletes whatever in the resource group isn't in the template. - Export and decompile. Export template (portal, or
az group export) writes what exists now as ARM JSON.az bicep decompileturns JSON into Bicep. Both are starting points: names and values are hard-coded and some properties are missing. - A VM, its host and its size. A VM runs on a physical host in a hardware cluster. Its size (Standard_D2s_v5: D family, 2 vCPUs, premium storage, v5) sets CPU, memory, disk count and price. A resize restarts the VM; a size that isn't on the current cluster needs the VM deallocated first.
- Disks and encryption at host. OS and data disks are managed disks in Azure Storage, encrypted at rest by default. The temp disk and the disk caches live on the host. Encryption at host encrypts those too, end to end; it needs the feature registered and the VM deallocated.
- Move to another resource group or subscription. A move keeps the region and the VM keeps running, but every resource ID changes. The VM must travel with its disks and network interface; across subscriptions the virtual network goes too.
- Move to another region. Azure Resource Mover copies resources to another region: add them, validate dependencies, prepare, initiate move, then commit (or discard) and delete the source.
- Availability sets vs zones. An availability set spreads VMs over fault domains (racks with their own power and network) and update domains in one datacenter: 99.95%. Availability zones spread VMs over separate datacenters: 99.99%. A VM uses one or the other, chosen at creation.
- Scale sets grow on a rule. A Virtual Machine Scale Set (Flexible orchestration recommended) runs identical VMs across zones. Autoscale rules add instances when average CPU is high and remove them when it's low, always between the minimum and maximum.