šŖAzure Bicep: working with Parameters ā Best practices
When and how should you use parameters in your Azure Bicep templates.
In Azure Bicep, the new domain-specific language (DSL) to declarative deploy Azure resources, we define parameters just as we did in ARM templates. There are a few differences in the syntax we should consider.
Parameters in Azure Bicep
Parameters are input values we define in the Bicep template. These values can be passed on either inline during the deployment operation or referenced from a Parameters file.
Declaring parameters in Azure Bicep
You need to provide a name and type for each parameter in your Bicep template. The code below shows how to declare parameters:
param demoString string
param demoInt int
param demoBool bool
param demoObject object
param demoArray array
A parameter canāt have the same name as a variable, module, or resource. Donāt overuse parameters. Parameters are often utilized when we need to pass on values that need to vary for different deployments.
For example, when you create a storage account, you need to provide the SKU and type; you could leverage parameters.