There are many ways to deploy resources on Azure, talking about the Azure Resource Manager deployment model and not the Classic one. I’ve been doing many deployments in the last couple of months and the thing is… you will do it more than once and that is certain. So, scripting comes handy.
ARM Templates
By now you have seen that I tend to use the ARM Templates quite often. It is a very nice way to keep things tidy and in order. Then with the use of PowerShell or Azure CLI I deploy the resources on Azure.
New-AzResourceGroupDeployment ` -DeploymentName giveYourDeploymentAName ` -ResourceGroupName resourceGroupName ` -TemplateFile yourARMTemplateFileName.json ` -Verbose
That is a basic PowerShell script to deploy your ARM Templates. You can accomplish the same with the following Azure CLI command:
az deployment group create \ --name giveYourDeploymentAName \ --resource-group resourceGroupName \ --template-file yourARMTemplateFileName.json \ --verbose
Depending on the things you deploy on Azure, it can take from less than a minute to half an hour to a couple of hours.
The “-Verbose” flag on the above script gives you feedback in the terminal on the on-going deployment.

Now, while your deployment is running you can switch to Azure portal and go the specific Resource Group you are deploying to and then click on the “Deployments”

Then you can click the deployment that is currently in progress (“deploying”) and get a list of all the actions done from your ARM Template!

Now you see all the operations and their progress as well as more information by clicking on the “Operation details” in each resource line.
Nice 🙂
Cheers!
Comments (0)