Chapter 7 - ARM Templates
Chapter 7.8 - ARM Template CheatSheet

AZ-104 Certification Notes

Chapter 7.8 - ARM Template CheatSheet

ARM Templates CheatSheet

Infrastructure As Code (IaC) is the process of managing and provisioning computer data centers (eg, Azure) through machine-readable definition files (eg. JSON files) rather than physical hardware configuration or interactive configuration tools.

IaCs can either be:

  • Declarative
    • You define exactly what you want, and you get exactly that
  • Imperative
    • You define what you generally want, and the service will guess what you want

ARM templates are JSON files that define azure resources you want to provision and azure services you want to configure. ARM templates are declarative. (You get exactly what you define)

An ARM template is made of the following JSON structure:

  • $schema
    • Describes the properties that are available within a template
  • contentVersion
    • The version of the template. You can provide any value for this element
  • apiProfile
    • Use this value to avoid having to specify API versions for each resource in the template
  • parameters
    • Values you can pass along to your template
  • variables
    • You transform parameters or resource properties using function expressions
  • functions
    • User-defined functions available within the template
  • resources
    • The azure resources you'll want to deploy or update
      • type
        • Type of resource
      • apiVersion
        • Version of the REST API to use for the resource, Each resource provider published its own API versions
      • name
        • Name of the resource
      • Location
        • Most resources have location property, The region where the resource will be deployed
      • Other Properties
        • Other properties we can use to configure the resource. Will vary per resource type
    • outputs
      • Values that are returned after deployment