Azure Templates
Azure Resource Manager is built on JSON (JavaScript Object Notation). All of the metadata about ARM resources is stored as JSON and while we talk about the portal for resource creation, as we will learn, all of the REST APIs ultimately result in resources defined via JSON, even when provisioning using PowerShell or the CLI. If you navigate to https://resources.azure.com, you can directly view the JSON for all your resources. As you may expect, you can deploy resources by creating a JSON file and deploying that directly to Azure. In fact, this is the preferred way to create resources, as using a template brings a number of key benefits:
- The deployment is prescriptive, in that it will always deploy the same way.
- It is declarative, meaning the end desired state is documented rather than the actual steps to perform the deployment (which would be imperative—e.g., PowerShell deployments are imperative).
- The deployment is idempotent, which means the template can be run...