0PricingLogin
Azure Fundamentals · Lesson

Writing ARM Templates

Build a parameterised ARM template in JSON to deploy a storage account and VM, and use template functions and variables to make templates reusable.

Why Use ARM Templates?

ARM templates let you define Azure infrastructure as code in JSON format. This enables repeatable, consistent deployments that can be version-controlled alongside your application code. Templates are idempotent — running the same template multiple times produces the same result, making them safe to re-apply after changes.

Template Skeleton and Schema

Every ARM template starts with a $schema property pointing to the template schema URL, followed by a contentVersion string. The schema tells the Azure portal and editor extensions how to validate and provide IntelliSense for your template. The five main sections that follow are parameters, variables, functions, resources, and outputs.

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

All lessons in this course

  1. How Azure Resource Manager Works
  2. Writing ARM Templates
  3. Bicep: Modern Azure IaC
  4. Terraform on Azure
← Back to Azure Fundamentals