Deploying a Bicep Template – Azure PowerShell
You built a Bicep template for deploying storage accounts in the previous section. You will now deploy the storage account to ResouceGroupA
, which you created earlier. To do this, follow these steps:
- 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:\biceptemplatesfolder\
- You are going to choose a name for your storage account name that is unique, such as
teststor3012231
. Then, in your PowerShell terminal, run the following code to start deployment:New-AzResourceGroupDeployment -ResourceGroupName ResourceGroupA -TemplateFile ./Storage_Account_Bicep.bicep -storageAccountName "teststor0312231"
- Once the script has finished running, your deployment will be complete. Notice that there are outputs that resemble the configurations we are expecting to see.
Figure 11.7: Storage...