Automate deployment of resources using ARM templates or Bicep
📘Microsoft Certified: Azure Administrator Associate (AZ-104)
When working as an Azure Administrator, you often need to create resources repeatedly—such as virtual machines, storage accounts, networks, or databases. Instead of manually clicking through the Azure Portal every time, Azure provides Infrastructure as Code (IaC) using:
- ARM Templates (JSON files)
- Bicep Files (a simplified IaC language that compiles into ARM templates)
For the AZ-104 exam, you must be able to read and understand these files, even if you are not required to write them from scratch.
✅ What You Need to Know for the Exam
The exam expects you to:
- Recognize the structure of ARM and Bicep files.
- Understand key sections, such as:
- parameters
- variables
- resources
- outputs
- modules (Bicep)
- Identify what a resource will deploy based on the code.
- Interpret syntax, such as:
- resource types
- API versions
- property names
- dependencies
- parameter references
- Understand the relationship between ARM and Bicep, including that:
- Bicep is converted into ARM JSON
- ARM and Bicep achieve the same goal
—————————————-
1. ARM Template Structure (JSON)
ARM templates use JSON format with a strict structure.
A typical ARM template contains:
{
"$schema": "",
"contentVersion": "",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}
✔ $schema
Defines the template version.
Not important to memorize—but you must know it validates the template structure.
✔ contentVersion
A version number (for your own tracking), such as "1.0.0.0".
✔ parameters
Values passed into the template at deployment time.
Used to avoid hard-coding values.
Example:
"parameters": {
"vmName": {
"type": "string"
}
}
✔ variables
Values that are calculated or reused inside the template.
Example:
"variables": {
"storageSku": "Standard_LRS"
}
✔ resources
The most important section.
Defines what Azure resources will be deployed.
Example:
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2023-01-01",
"name": "[parameters('storageAccountName')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2"
}
You should understand:
type→ Azure resource typeapiVersion→ API version for the resourcename→ name of the resourcelocation→ regionsku→ pricing/performance tierdependsOn→ deployment order
✔ outputs
Used to return values after deployment.
Example:
"outputs": {
"storageEndpoint": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))).primaryEndpoints.blob]"
}
}
—————————————-
2. Bicep File Structure
Bicep files are much simpler, but still contain the same concepts.
Typical format:
param vmName string
var vmSize = 'Standard_B2s'
resource vm 'Microsoft.Compute/virtualMachines@2023-07-01' = {
name: vmName
location: resourceGroup().location
properties: {
hardwareProfile: {
vmSize: vmSize
}
}
}
output vmId string = vm.id
Key differences from ARM:
- No JSON formatting
- Simpler, cleaner syntax
- No brackets (
[ ]) - Identifiers (
param,var,resource,output) replace JSON structure
—————————————-
3. Understanding Key Elements
a. Parameters
Used to make deployment flexible.
Bicep:
param adminUsername string
ARM:
"parameters": {
"adminUsername": { "type": "string" }
}
Why parameters matter:
They allow:
- reusable templates
- environment-specific values (prod, dev, test)
b. Variables
Used for calculated or reused values.
Bicep:
var location = resourceGroup().location
ARM:
"variables": {
"location": "[resourceGroup().location]"
}
c. Resources
Defines the actual Azure resource that will be created.
Know how to interpret:
- Resource type:
Microsoft.Network/virtualNetworks - API version:
2023-02-01 - Properties:
"addressSpace","subnets","sku","kind", etc.
Bicep:
resource vnet 'Microsoft.Network/virtualNetworks@2023-02-01' = {
name: 'myVnet'
location: resourceGroup().location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/16'
]
}
}
}
The exam may ask:
“What resource does this template deploy?”
→ A virtual network
“Which IP range will be created?”
→10.0.0.0/16
d. dependsOn
Ensures the correct deployment order.
Example:
dependsOn: [
storageAccount
]
ARM:
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', 'myStorage')]"
]
The exam expects you to understand:
- some resources require other resources first
dependsOncontrols that order
e. Outputs
Provides information after deployment.
You may see:
- storage URL
- VM ID
- public IP address
Know that outputs do not create resources—they only return values.
—————————————-
4. Relationship Between ARM and Bicep
You must understand:
| Concept | Explanation |
|---|---|
| Bicep is a higher-level language | Easier to read and write |
| ARM is JSON | More complex to write manually |
| Bicep compiles into ARM | Azure always uses ARM internally |
| Both represent Azure resources | Same functionality |
You may see a question asking:
“Which statement is true about Bicep?”
Correct answer:
Bicep is a DSL (domain-specific language) that compiles into ARM JSON.
—————————————-
5. How ARM/Bicep Are Used in IT Environments (IT-relevant examples only)
Azure Administrators use templates to:
- Deploy multiple virtual machines consistently
- Create entire network environments (VNets, subnets, NSGs)
- Create standardized storage accounts
- Rebuild test environments quickly
- Share deployment configurations across teams
- Automate repeatable deployments for dev/test/production
These are common in:
- DevOps pipelines
- Azure DevTest Labs
- CI/CD processes
- Infrastructure automation
—————————————-
6. AZ-104 Exam Tips for This Topic
✔ You do NOT need to memorize syntax
But you MUST recognize:
- what parameters, variables, resources, and outputs look like
- which Azure resource a file will deploy
- resource types and their structure
✔ You must interpret, not build
The exam may show a snippet and ask:
- “What will this deploy?”
- “Which parameter is required?”
- “What value is passed into this property?”
- “What is the resource type?”
- “What is the output returning?”
✔ Understand that Bicep = ARM but easier
Questions may compare the two.
✔ Know the structure of both formats
Even if you do not memorize exact syntax.
—————————————-
7. Summary (Exam-Ready)
By the end of this topic, you should understand:
ARM Templates
- JSON format
- Contain: schema, version, parameters, variables, resources, outputs
- Must interpret resource types and properties
Bicep Files
- Simpler IaC language
- Uses
param,var,resource,output - Compiles to ARM
Key Skills for Exam
- Identify what a deployment will create
- Read resource types and names
- Understand parameter usage
- Recognize dependencies (
dependsOn) - Interpret outputs
If you can look at an ARM or Bicep file and say:
“I understand what this will deploy and how the values are being used,”
you are fully prepared for the exam section.
