Course contentsShow
← Cloud and Infrastructure
Lesson 894 of 2,98917. Azure ARM Templates and BicepFree lesson

ARM Template Structure and JSON Syntax

Learn the core ARM template schema: schema, contentVersion, parameters, variables, resources, and outputs.

ARM Template Structure and JSON Syntax

You'll learn: The six core sections that make up every ARM template and how they work together in JSON format.

What Is an ARM Template?

An ARM (Azure Resource Manager) template is a JSON file that defines the infrastructure you want to deploy in Azure. Think of it like a detailed blueprint for a building—it specifies exactly what you want, how it should be configured, and how pieces connect together.

The Six Core Sections

Every ARM template follows a specific schema with these key sections:

1. schema – Specifies which ARM template version you're using
2. contentVersion – Your own version number for tracking template changes
3. parameters – Input values you can customize at deployment time (like function arguments)
4. variables – Computed or reusable values within the template
5. resources – The actual Azure resources to create (VMs, databases, networks)
6. outputs – Values returned after deployment completes (like function return values)

Basic Template Structure

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": { },
  "variables": { },
  "resources": [ ],
  "outputs": { }
}

How They Work Together

Think of it as a recipe: parameters are your ingredient choices, variables help you calculate measurements, resources are the cooking instructions, and outputs tell you what you made. The schema ensures Azure understands your recipe format, and contentVersion tracks which version you're using.

Only schema, contentVersion, and resources are required—the others are optional but extremely useful for creating flexible, reusable templates.

Key Takeaway: ARM templates use six JSON sections to declare Azure infrastructure as code, with schema/contentVersion providing structure, parameters/variables enabling flexibility, resources defining what to deploy, and outputs sharing results.