Bicep: Modern Azure IaC
Learn Bicep's concise syntax as a strongly-typed abstraction over ARM JSON, convert an existing ARM template to Bicep, and deploy it with the Azure CLI.
What Is Bicep and Why Use It?
Bicep is a domain-specific language (DSL) developed by Microsoft as a strongly-typed, concise alternative to ARM JSON templates. Bicep compiles down to standard ARM JSON, so it uses the same ARM deployment engine and supports all Azure resource types on day one. Bicep removes much of the boilerplate required by raw JSON and provides better type safety and IntelliSense support.
Bicep vs ARM JSON Syntax Comparison
The same storage account that requires ~25 lines of JSON in an ARM template needs only ~8 lines in Bicep. Bicep eliminates '$schema', contentVersion, the resources array wrapper, and the verbose expression syntax. Property names and types remain identical since Bicep is a direct abstraction layer over ARM JSON — there is zero runtime difference.
// Bicep: deploy a storage account
param storageAccountName string
param location string = resourceGroup().location
param sku string = 'Standard_LRS'
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: storageAccountName
location: location
sku: {
name: sku
}
kind: 'StorageV2'
properties: {
supportsHttpsTrafficOnly: true
minimumTlsVersion: 'TLS1_2'
}
}All lessons in this course
- How Azure Resource Manager Works
- Writing ARM Templates
- Bicep: Modern Azure IaC
- Terraform on Azure