Pass Inline Parameters to Bicep Template

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.

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.