Deploying Bicep with the Azure CLI
The procedure is the same with the Azure CLI, so let's review the necessary commands to validate and deploy our Bicep files with this cross-platform CLI.
The first thing you should know – and it has been pointed out before – is that you need to have version 2.20.0 or later of the Azure CLI installed. Once you have installed it, you need to log in and connect to your Azure environment.
Connecting to your Azure environment
All the Azure CLI commands will begin with the az
keyword. To log in, simply run the following command:
az login
A browser window will appear where you can log in. Once you have done this, it will pass the authenticated context to your terminal. If you have multiple subscriptions, as we did with Azure PowerShell, use the az account
command:
az account set -s <subscriptionid or name>
Now, you are ready to deploy your Bicep files. The Azure CLI also has built-in integration with Bicep, so...