Plan Azure ARM Deployments Before Applying

In this blog post, I will show you how to plan Azure ARM deployments similar to Terraform plan before deploying the code.

Azure ARM Plan Vs Terraform Plan

In Terraform we the terraform command which allows us to simulate and do a dry test of the deployment before actually deploying the infrastructure \ code.

Azure ARM equivalent of Terraform plan if the command –confirm-with-what-if or -c as shortcut.


In the following example, I have an ARM deployment that I use with Azure CLI that uses the plan option (what-if).

az deployment group create --name deploy --resource-group AKS-RG2 --template-file azuredeploy.json --parameters azuredeploy.parameters.json --confirm-with-what-if

After running the code, the output will look like the screenshot below, the good thing about Azure what if is that it saves you the need to run another command if you are happy with the planing command and all you need to do is press, yes to deploy \ apply.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.