Deploying an ARM Template – Azure PowerShell
In the previous section, you deployed an existing ARM template using the Azure portal, which created two resource groups with tags. In this section, you will deploy the same templates using Azure PowerShell:
- Copy the template from the Creating an ARM Template section and save it as
azuredeploy.json
. - Create a parameter file for the template and save it as
azuredeploy.parameters.json
. - Populate the parameter file and ensure that you are choosing a unique name for the storage account. Adding in the date string as part of the account name generally helps to ensure a unique name, for example,
teststorageaccount291223
. - Open your PowerShell terminal and run the following code to navigate to the folder where you saved your files; change the path to match your directory:
cd c:\jsontemplatesfolder\
- In your PowerShell terminal, run the following code to start deployment:
New-AzResourceGroupDeployment -ResourceGroupName ResourceGroupA...