Bicep

Documentation

Getting started docs

Introductory material to bicep

What is Bicep? - Microsoft Docs

Get started with Bicep - Github

Reference docs

Reference documentation covering authoring each part of the template, such as parameters, variables, resources, functions, output...

Bicep Docs - Github

Bicep Docs - Microsoft Docs

ARM Template References - Microsoft Docs

Training modules

Microsoft Learn training modules covering bicep Deploy and manage resources in Azure by using Bicep - MS Learn

Tools

Tools for working with and authoring bicep templates

Bicep VS Code Extension - VS Code extension enabiling intelisense, snippets and error checking of bicep files.

Bicep CLI - Windows - Windows version of the bicep CLI used for compiling and decompiling templates. Required to directly deploy bicep files using Azure PowerShell/CLI

Bicep Playground - online bicep compiler - Online bicep compiler with bicep and compiled json side by side. Great for discovering differences between bicep and json.

Building

Local

Install the bicep CLI (linked above) and use build bicep <filename> to build .bicep to .json or bicep decompile <filename> to go the other way.

bicep build src/demo.bicep

Pipeline

Install the bicep CLI and Build using bicep build <file>

- script: |
    curl -Lo bicep.bin https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
    chmod +x ./bicep.bin
    sudo mv ./bicep.bin /usr/local/bin/bicep
    bicep --help
  displayName: 'Install Bicep CLI'
- script: |
    bicep build src/demo.bicep

Deploying

To deploy the template locally or in pipeline there are two main options:

  • compile the template into json and deploy in the same way you deploy json templates
  • install the bicep CLI and deploy using Azure PowerShell (New-AzResourceGroupDeployment) or Azure CLI (az deployment group create)
az deployment group create -f ./src/demo.bicep -g bicepdemo