4 Deploying ARM templates

 

This chapter covers

  • Understanding what happens when a template is deployed
  • Choosing a deployment tool
  • Picking the correct template deployment scope and deployment mode
  • Understanding how authorizations, policies, and resource locks influence deployments
  • Debugging template deployments

After discussing how to write ARM templates in the previous chapters, it is time for a more in-depth discussion of what happens when you deploy a template. Every deployment goes through the same series of steps after you have submitted it to Azure Resource Manager. The first part of this chapter goes through all those steps one by one.

After discussing the deployment process, two more topics are covered concerning deployments. Section 4.5 discusses how you can use ARM to validate templates without actually deploying them. Besides validation only, you can also perform a dry run using a template. Such a dry run lists all changes that are made when deploying the template for real.

Before diving into the details of the deployment process, let’s start with a quick overview.

4.1   An overview of the deployment process

All ARM deployments go through the same process for deployment. The following image visualizes that process.

Figure 4.1: Template deployment process

4.2   Submitting a deployment

4.2.1   Choosing a deployment scope

4.2.2   Submitting a template using different tools

4.3   The Execution phase

4.3.1   Role-Based Access Control

4.3.2   Azure Policy

4.3.3   Resource locks

4.3.4   Resource provisioning

4.4   The Clean-up Phase

4.4.1   Incremental deployment mode

4.4.2   Complete deployment mode

4.4.3   Combining deployment modes

4.5   Template validation and What-If deployments

4.5.1   Validating an ARM template

4.5.2   What-if deployments

4.6   Troubleshooting template deployments

4.7   An Azure DevOps pipeline example

4.8   Summary

sitemap