Lesson 22 of 28 · see all lessons
Start here: cloud concepts (skill area 1, 25-30%)
- 1. Start here: the AZ-900 exam, the plan and what you already know
- 2. What cloud computing is: shared responsibility and cloud models
- 3. Paying for the cloud: the consumption-based model, pricing models and serverless
- 4. Why the cloud: availability, scalability, reliability, security and manageability
- 5. IaaS, PaaS and SaaS: cloud service types and when to use each
Azure architecture, compute and networking (skill area 2, 35-40%)
- 6. Azure global infrastructure: regions, region pairs, sovereign regions and availability zones
- 7. Organizing Azure: resources, resource groups, subscriptions and management groups
- 8. Azure virtual machines: VM options, scale sets, availability sets and Azure Virtual Desktop
- 9. Containers, Azure Functions and app hosting: choosing a compute type
- 10. Azure networking: virtual networks, subnets, peering and Azure DNS
- 11. Connecting to Azure: VPN Gateway, ExpressRoute, and public and private endpoints
Storage and migration (skill area 2)
Identity, access and security (skill area 2)
Management and governance (skill area 3, 30-35%)
- 19. Azure costs: cost factors, the pricing calculator, Cost Management and tags
- 20. Governance and compliance: Microsoft Purview, Azure Policy and resource locks
- 21. Managing Azure: the portal, Cloud Shell, Azure CLI, PowerShell and Azure Arc
- 22. Infrastructure as code: Azure Resource Manager and ARM templates
- 23. Monitoring Azure: Advisor, Service Health, Azure Monitor, Log Analytics, alerts and Application Insights
Final review and four mock exams
17 min
Infrastructure as code: Azure Resource Manager and ARM templates
Understand Azure Resource Manager, infrastructure as code, and why ARM templates make deployments repeatable.
By the end of this lesson you can
- Define infrastructure as code and say why teams use it
- Describe what Azure Resource Manager does with every request
- Explain what declarative and idempotent mean for an ARM template
- Recognize Bicep as a simpler language that becomes an ARM template
From earlier lessons · 1 of 2
A Copperleaf depot manager must run two Azure PowerShell commands from a shared kiosk PC. Nothing may be installed on it. What should the manager use?
Pick one answer.
From earlier lessons · 2 of 2
Copperleaf runs a Kubernetes cluster in a depot and Linux servers in another cloud. It wants to tag and apply Azure Policy to all of them from Azure. What should it use?
Pick one answer.
Sam's script builds the depot storage, but it is a list of steps. Step 4 failed halfway at the Leeds depot, and now nobody knows what exists. Running the script again creates duplicates. Sam wants one file that describes the finished depot. Azure should work out the steps, and running the file twice should change nothing.
Infrastructure as code
Exam depth: know it cold.
Infrastructure as code (IaC) means you manage infrastructure through code and templates instead of manual clicks. Infrastructure here means networks, virtual machines, storage and the like.
- Repeatable. Anyone on the team can run the code and build a matching environment.
- Version-controlled. You store the code in a source repository, like application code. You can see who changed what, and roll back.
- Consistent. Test and production come from the same file, so they don't drift apart.
IaC can start with Azure CLI or PowerShell scripts. It grows into templates: ARM templates and Bicep.
Azure Resource Manager: the front door for every request
Exam depth: know it cold.
Azure Resource Manager (ARM) is the deployment and management service for Azure. Anytime you create, update or delete anything in Azure, ARM is involved.
- You send a request from any tool: the portal, Azure CLI, Azure PowerShell, an SDK (a code library) or the REST API.
- ARM authenticates you (who are you?) and authorizes the request (may you do this?).
- ARM passes the request to the right resource provider, the Azure service that supplies that resource type. Microsoft.Storage supplies storage accounts, for example.
All tools use the same API, so you get consistent results whichever tool you pick.
Exam depth: know it cold.
With Azure Resource Manager, you can:
- Use declarative templates rather than scripts to manage infrastructure.
- Manage resources as a group: deploy, manage and monitor a solution's resources together.
- Redeploy with confidence: get a consistent state every time.
- Define dependencies, so resources are created in the right order.
- Control access on every service, because Azure RBAC is built into ARM.
- Apply tags to organize resources.
- Clarify billing by viewing costs for resources that share a tag.
RBAC, tags and locks all work through ARM. That is why they behave the same in every tool.
Copperleaf's admins use the portal, Azure CLI and Azure PowerShell. A manager worries that each tool might create resources differently. Why do they all give the same results?
Pick one answer.
ARM templates: describe the end state in JSON
Exam depth: know it cold.
An ARM template is a JSON file that defines the infrastructure and settings you want. JSON (JavaScript Object Notation) is a plain-text format of names and values.
- Declarative syntax. You state what to deploy, not the sequence of commands to build it.
- Repeatable results. Templates are idempotent: deploy the same template many times and you get the same resources in the same state. If they already match, nothing changes.
- Orchestration. ARM works out the right order for resources that depend on each other, and deploys in parallel when it can. One command deploys everything.
Read the tiny template below before you go on.
{"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#","contentVersion": "1.0.0.0","resources": [{"type": "Microsoft.Storage/storageAccounts","apiVersion": "2025-06-01","name": "copperleafleeds01","location": "westeurope","sku": { "name": "Standard_LRS" },"kind": "StorageV2"}]}
Predict, then reveal
Answer three questions before you look. 1) What will this template create, and where? 2) Which resource provider handles it? 3) Sam deploys it twice. What happens the second time?
Exam depth: recognize it.
Microsoft lists more benefits of ARM templates. Know the word and its meaning.
| Benefit. | Means. |
|---|---|
| Modular files. | Split a template into smaller reusable parts, or nest one inside another. |
| Extensibility. | Add PowerShell or Bash deployment scripts for setup steps. |
| Built-in validation. | ARM checks the template first, so a deployment rarely stops half-finished. |
| Tracked deployments. | The portal keeps a history of each deployment and its values. |
| Policy as code. | Azure Policy remediates noncompliant resources deployed by templates. |
| Exportable code. | Export a template from an existing resource group. |
| Authoring tools. | Write templates in Visual Studio Code or Visual Studio. |
Match
Match each Copperleaf need to the ARM template benefit that meets it.
Pick an item on the left, then its match on the right.
For the statement, select Yes if it is true. Otherwise, select No. If you deploy the same ARM template twice, Azure creates a second copy of every resource in it.
Pick one answer.
Bicep: the same thing, easier to read
Exam depth: recognize it.
Bicep is a language that uses declarative syntax to deploy Azure resources. It offers the same capabilities as ARM templates, with a shorter, easier syntax than JSON.
During deployment, each Bicep file is converted into an ARM template. So Bicep still goes through Azure Resource Manager.
Bicep supports new Azure resource types as soon as they appear, and Bicep files are idempotent too.
Decision rule: "JSON" points to ARM templates. "Simpler syntax that compiles to ARM" points to Bicep.
Copperleaf's team finds JSON templates hard to read. They want a declarative Azure language with simpler syntax that still deploys through Azure Resource Manager. What should they use?
Pick one answer.
Exam-style practice
A retailer builds identical test, staging and production environments. The build must be consistent every time and stored in source control. What should it use?
Pick one answer.
Which Azure service authenticates and authorizes every request to create, update or delete a resource?
Pick one answer.
For the statement, select Yes if it is true. Otherwise, select No. An ARM template lists the commands Azure must run, in order, to build each resource.
Pick one answer.
Worth keeping
- Infrastructure as code makes builds repeatable, consistent and version-controlled.
- Every Azure request, from any tool, goes through Azure Resource Manager.
- ARM templates are declarative JSON files: say what you want, ARM works out the order.
- Templates are idempotent: deploying again gives the same state, not duplicates.
- Bicep is a simpler declarative language that becomes an ARM template.
On the job
Copperleaf's auditors ask how they can be sure every depot is set up the same way. Sam shows them one template in source control, with its full change history. Each depot is a deployment of that file.
For project managers, this changes estimates. The first depot takes a week to design. The next eight take minutes each, and they match.
All 9 depots now run on Azure, built from one template. On Monday morning, drivers report the route app is slow. Is it Copperleaf's app, its database, or Azure itself? Next lesson: Azure's monitoring tools.
Leaderboard
Loading…
50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.
Embed this practice on your site
Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.
Report a copyright problem with this lesson
Sources for this lesson (7)
Each fact in the lesson is marked with the number of the page it comes from.
- [1]Microsoft Learn: Study guide for Exam AZ-900: Microsoft Azure Fundamentals
- [38]Microsoft Learn: What is Azure Resource Manager?
- [119]Microsoft Learn: Describe tools for interacting with Azure
- [120]Microsoft Learn: Describe the purpose of Azure Arc
- [124]Microsoft Learn: Describe Azure Resource Manager and Azure ARM templates
- [125]Microsoft Learn: What are ARM templates?
- [126]Microsoft Learn: What is Bicep?