This blog post will show how to pass parameters to a Bicep template using the command line when using Azure CLI.
Parameters
Passing parameters to a Bicep template can be done either via the command line or a parameter file; however, when using both options in a deployment, the inline parameter takes precedence.
In the example below, I’m using Azure CLI to deploy a Bicep template and the following switch to pass the storage account name parameter to the template.
–parameters storageaccountname=ntweeklyc0002
You can see the full command below.
az deployment group create --name vars --template-file 2.2.storage_account.bicep --parameters storageaccountname=ntweeklyc0002 --resource-group biceplab
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.
Leave a Reply