0
0
Azurecloud~10 mins

ARM template structure in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - ARM template structure
Start ARM Template
Define $schema
Set contentVersion
Declare parameters
Declare variables
Define resources
Declare outputs
End Template
The ARM template starts with schema and version, then defines parameters, variables, resources, and outputs in order.
Execution Sample
Azure
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {},
  "variables": {},
  "resources": [],
  "outputs": {}
}
This is a minimal ARM template structure showing all main sections.
Process Table
StepSection ProcessedActionResult
1$schemaRead and validate schema URLTemplate schema set for ARM validation
2contentVersionRead version stringTemplate version set to 1.0.0.0
3parametersParse parameters objectParameters ready for input values
4variablesParse variables objectVariables ready for internal use
5resourcesParse resources arrayResources defined for deployment
6outputsParse outputs objectOutputs defined for deployment results
7EndComplete parsingTemplate ready for deployment
💡 All sections processed; template structure is valid and ready for deployment
Status Tracker
SectionStartAfter Processing
$schemaNot sethttps://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#
contentVersionNot set1.0.0.0
parametersEmpty{}
variablesEmpty{}
resourcesEmpty[]
outputsEmpty{}
Key Moments - 3 Insights
Why is the $schema property important in an ARM template?
The $schema property tells Azure how to validate the template structure and syntax. Without it, Azure cannot confirm the template is correct (see execution_table step 1).
Can the resources section be empty in a valid ARM template?
Yes, the resources array can be empty if no resources are being deployed, but the template still needs to include it (see execution_table step 5).
What is the purpose of the outputs section?
Outputs provide information back after deployment, like resource IDs or connection strings. They are optional but useful (see execution_table step 6).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the result after processing the parameters section?
AResources defined for deployment
BTemplate version set to 1.0.0.0
CParameters ready for input values
DOutputs defined for deployment results
💡 Hint
Check execution_table row with Section Processed 'parameters'
At which step does the ARM template finish parsing all sections?
AStep 5
BStep 7
CStep 6
DStep 4
💡 Hint
Look for the row with Section Processed 'End' in execution_table
If the variables section is removed, which part of the variable_tracker would change?
AThe variables row value
BThe $schema value
CThe outputs row value
DThe resources row value
💡 Hint
Check variable_tracker row for 'variables' section
Concept Snapshot
ARM Template Structure:
- $schema: URL for template validation
- contentVersion: template version
- parameters: inputs for deployment
- variables: internal values
- resources: Azure resources to create
- outputs: values returned after deployment
All sections must be valid JSON objects or arrays.
Full Transcript
An ARM template is a JSON file that defines Azure resources to deploy. It starts with a $schema property that tells Azure how to validate the template. Then it has a contentVersion to track template version. Parameters allow users to input values when deploying. Variables store internal values used in the template. Resources define what Azure services to create or configure. Outputs return information after deployment. Each section is processed in order, and the template must be valid JSON to deploy successfully.