Deploying Bicep with Azure PowerShell
As we mentioned in Chapter 2, Installing Azure Bicep, for you to be able to deploy Bicep files using Azure PowerShell, you need to have version 5.6.0 or later installed. Once you have your Bicep file ready to be deployed, open a PowerShell terminal (it is not important whether you use the integrated terminal in VS Code or an independent one). Once done, you need to log into Azure first.
Connecting to your Azure environment
You will need to use the Connect-AzAccount
command to log into Azure:
Connect-AzAccount
This will open a browser window where you get to log into your Azure tenant. Once you've done this, it will pass the authenticated context back to your terminal:
If you have access to multiple subscriptions in your tenant, you will see a message similar to the previous one, where you will need to use the Set-AzContext
command to select...