Infrastructure as Code: ARM, Bicep, and Arc
Define your entire Azure environment in code β repeatable, version-controlled, and automated. Plus Azure Arc for managing resources beyond Azure.
Infrastructure as Code β why it matters
Imagine building IKEA furniture.
You could build it from memory β but every time, youβd forget a step and the bookshelf would wobble. Or you could follow the instruction manual β identical bookshelf every time.
Infrastructure as Code (IaC) is the instruction manual for your cloud. Instead of clicking through the Azure portal to create resources, you write a file that describes exactly what you want. Then you βdeployβ the file, and Azure builds it perfectly β every time.
ARM templates and Bicep are Azureβs IaC languages.
Azure Arc extends Azure management to resources running elsewhere β on-premises servers, other clouds, or edge locations. One control plane to rule them all.
Azure Resource Manager (ARM)
ARM is the management layer that handles all requests to Azure:
Azure Portal βββ ARM βββ Azure Resources
Azure CLI βββ ARM βββ Azure Resources
PowerShell βββ ARM βββ Azure Resources
REST API βββ ARM βββ Azure Resources
ARM Template βββ ARM βββ Azure Resources
No matter how you interact with Azure, ARM processes the request. This ensures:
- Consistent behaviour across all tools
- Access control (RBAC is enforced at the ARM layer)
- Tagging and resource organisation
- Dependency management between resources
ARM templates and Bicep
ARM templates (JSON)
ARM templates are JSON files that define your infrastructure:
| Benefit | Description |
|---|---|
| Declarative | You describe WHAT you want, not HOW to create it |
| Repeatable | Deploy the same template in dev, test, and production |
| Idempotent | Deploy the same template twice = no duplicate resources |
| Version controlled | Store in Git, track changes, review before deploying |
| Orchestrated | ARM handles dependencies (create the VNet before the VM) |
Bicep β cleaner IaC
Bicep is a simpler language that compiles to ARM template JSON. Think of Bicep as the human-friendly version of ARM templates:
| Aspect | ARM Template (JSON) | Bicep |
|---|---|---|
| Syntax | Verbose JSON | Clean, concise |
| Learning curve | Steeper | Easier |
| File extension | .json | .bicep |
| Capabilities | Full Azure support | Same (compiles to JSON) |
Exam scope: AZ-900 tests whether you understand the PURPOSE and benefits of IaC, ARM, and Bicep β not the syntax details. Know that Bicep is simpler than JSON ARM templates but produces the same results.
Declarative vs imperative
IaC can be declarative or imperative:
- Declarative (ARM templates, Bicep, Terraform): βI want 2 VMs, a VNet, and a database.β The tool figures out how to create them.
- Imperative (CLI scripts, PowerShell): βStep 1: Create VNet. Step 2: Create VM-1. Step 3: Create VM-2. Step 4: Create database.β
ARM templates and Bicep are declarative β you define the desired state, and Azure makes it happen.
Azure Arc β manage beyond Azure
Azure Arc extends Azure management to resources outside Azure:
| What It Manages | Where It Runs | Example |
|---|---|---|
| Arc-enabled servers | On-premises, AWS, GCP | Apply Azure Policy to an on-prem Windows server |
| Arc-enabled Kubernetes | Any Kubernetes cluster | Manage an on-prem K8s cluster from Azure portal |
| Arc-enabled data services | On-premises, edge | Run Azure SQL Managed Instance on your own hardware |
Why Arc matters:
- Single control plane β manage Azure and non-Azure resources from the Azure portal
- Consistent governance β apply Azure Policy to servers running anywhere
- Unified monitoring β use Azure Monitor for on-prem and cloud resources
Summit Construction uses Azure Arc to manage the Windows servers still running in their office. From the Azure portal, they can view health, apply policies, and monitor performance β even though those servers arenβt in Azure.
Exam tip: Azure Arc scenarios
If a question mentions managing resources in multiple clouds or on-premises through Azure, the answer is Azure Arc. Key phrases:
- βManage on-premises servers from Azureβ
- βApply Azure Policy to non-Azure resourcesβ
- βSingle management plane across hybrid environmentsβ
π¬ Video walkthrough
π¬ Video coming soon
Infrastructure as Code β AZ-900
Infrastructure as Code β AZ-900
~9 minFlashcards
Knowledge Check
Summit Construction wants to deploy identical environments for each new project β same VMs, networking, and database every time. What approach ensures consistency?
Harbour Health has servers in Azure AND in their on-premises datacenter. They want to manage both from a single Azure portal experience. Which service enables this?
Next up: Azure Advisor and Service Health β your cloud consultant and health dashboard.