Understanding ARM Templates
ARM templates are used to define infrastructure that needs to be deployed in Azure, which is also often referred to as IaC. One of the benefits of ARM templates is the ability to deploy resources rapidly via code with a level of consistency as opposed to deploying resources via the Azure portal, which is prone to errors and might introduce misconfigurations when repeating tasks. It is also useful to view deployment history.
ARM templates make use of the JavaScript Object Notation (JSON) format to define resources. To deploy ARM templates, there are two JSON files of importance:
- Template file: This is the main file and has sections to define parameters, variables, user-defined functions, resources, and outputs
- Parameters file: This file can be standalone or linked to the template file, which is usually done when there are many parameters used in complex deployments
Figure 10.1 shows how the ARM template structure looks when empty. Notice...