Using Azure Resource Manager
AZ-104 notes: Using Azure Resource Manager. Covers key concepts for the Azure Administrator Associate exam.
- Structured Summary + Deep Technical Understanding
Primary service:
- Azure Resource Manager
Official documentation:
ARM templates overview:
Deploy templates in portal:
Quickstart templates:
1️⃣ Core Concept: Everything in Azure Uses ARM Templates
Even when you deploy resources using:
- Azure Portal
- Azure CLI
- Azure PowerShell
Behind the scenes:
- ✔ An ARM template is generated ✔ Azure Resource Manager processes it ✔ Resource Providers deploy the resources
- The portal is simply a GUI for generating ARM templates.
2️⃣ Exporting a Deployment as an ARM Template
🔹 During Deployment (Before Create)
When creating a resource (e.g., Web App):
- Go to Create Resource
- Fill configuration
- Go to Review + Create
- Select Download a template for automation
This shows:
- ✔ The exact ARM template Azure will use ✔ Parameters and resource definitions ✔ Dependencies
This is extremely useful for:
- Learning ARM structure
- Converting manual deployments to Infrastructure as Code
- Creating reusable templates
🔹 After Deployment (Existing Resources)
- You can export ARM templates from completed deployments.
Steps:
- Go to Resource Group
- Select Deployments
- Open a deployment
- Select Template
- This shows the full template used for that deployment.
Important use case:
- ✔ Reverse engineer existing infrastructure ✔ Standardize legacy environments ✔ Create reusable templates from production
3️⃣ Deploying a Custom ARM Template in Portal
- You can manually deploy ARM templates from the portal.
Search for:
- "Deploy a custom template"
This opens:
- ✔ Template editor ✔ Quickstart templates ✔ Upload template option
4️⃣ Using Quickstart Templates
Azure provides public templates via:
- Azure Quickstart Templates
Repository:
Benefits:
- ✔ Prebuilt production-ready templates ✔ Complex deployments (e.g., hub-spoke, AKS, multi-tier apps) ✔ Learning resource
5️⃣ Building an ARM Template Using Portal Editor
In the demonstration:
- Start with blank template
- Add resource → Virtual Network
- Add resource → Virtual Machine
- Add resource → Storage Account
- Link VM to existing VNet in template
The editor:
- ✔ Automatically generates resource blocks ✔ Adds required variables ✔ Creates dependent resources (NIC, disk, etc.) ✔ Handles dependencies
This demonstrates:
- ARM handles dependency resolution automatically.
6️⃣ Example Resources Generated
When adding a VM, the template automatically included:
- Virtual Network
- Network Interface
- Storage Account
- VM resource
- Variables for naming
- OS configuration parameters
This illustrates:
- Deploying one “simple” resource often creates multiple dependent resources.
7️⃣ Template Deployment Flow
After clicking Create:
- Portal → ARM Template generated → Azure Resource Manager → Resource Providers → Deployment orchestrated
- ProvisioningState = Succeeded
8️⃣ Template Components Observed in Demo
The generated template contained:
- $schema
- contentVersion
- parameters
- variables
- resources
- Demonstrating real-world template structure.
9️⃣ Key Capabilities Demonstrated
✔ Export template before deployment ✔ Export template after deployment ✔ Use template editor ✔ Add multiple resources ✔ Link resources within template ✔ Deploy template via portal
🔟 Why This Is Important
ARM templates allow:
✔ Standardized infrastructure ✔ Dev/Test/Prod parity ✔ Disaster recovery redeployment ✔ CI/CD automation ✔ Governance consistency
1️⃣1️⃣ Deployment Modes Reminder
ARM supports:
Incremental (default)
Adds/updates defined resources
Does not delete others
Complete
- Removes resources not in template
- Use carefully
Docs:
1️⃣2️⃣ ARM Templates in CI/CD
Common pipeline pattern:
- Git repository → ARM template → Azure DevOps / GitHub Actions → ARM deployment task → Infrastructure provisioned
Outputs from template can feed into:
- Subsequent pipeline steps
- Application deployments
1️⃣3️⃣ Real-World Example
Instead of manually creating:
- VNet
- VM
- Storage account
- NIC
- NSG
- You define them once in a template.
Then:
- Deploy to Dev
- Deploy to Test
- Deploy to Prod
- Same template, different parameter files.
1️⃣4️⃣ Common Exam Pitfalls
🚩 ARM templates are only used in CLI → False 🚩 Portal doesn’t use ARM → False 🚩 Templates can’t be exported → False 🚩 Templates only deploy one resource → False 🚩 Dependencies must always be manually defined → Not always (ARM resolves automatically)
1️⃣5️⃣ Mental Model
Think of ARM templates as:
- Blueprints.
- Portal = Blueprint generator CLI = Blueprint executor PowerShell = Blueprint executor
- ARM = Construction manager Resource Providers = Construction teams
1️⃣6️⃣ Final Key Takeaways
- ✔ Everything in Azure is ARM-driven ✔ Portal generates ARM templates behind the scenes ✔ You can export templates before and after deployment ✔ Templates allow repeatable infrastructure ✔ Multiple resources can be deployed together ✔ ARM resolves dependencies automatically ✔ Custom templates can be deployed directly from portal
ARM templates are foundational for:
- AZ-104
- AZ-204
- AZ-305
- DevOps engineering
- Enterprise cloud architecture
If you'd like next:
- 🧠 30 ARM deployment scenario questions
- 📄 Fully annotated multi-resource ARM template
- 🔄 ARM vs Bicep practical comparison
- 🚀 CI/CD pipeline example using ARM
- 🏗 Production-grade hub-spoke ARM template walkthrough
- Tell me your goal.
Hands-on: Export and Redeploy an ARM Template
Goal: See how portal-created resources become repeatable ARM deployments.
- Create a simple storage account from the portal.
- Open the resource group.
- Choose Export template.
- Download the template and parameters files.
- Review:
resourcesparametersdependsOn- resource provider names
- Delete the storage account.
- Choose Deploy a custom template.
- Upload or paste the exported template.
- Change the storage account name parameter to a new unique value.
- Deploy and confirm the resource is recreated.
Hands-on: Activity Log for Deployments
- Open the resource group.
- Go to Deployments and review the latest deployment.
- Open Activity log.
- Filter by operation name containing
deployments. - Confirm who initiated the deployment and whether it succeeded.
