An Introduction to Bicep
What Azure Resource Manager (ARM) is, where Bicep came from, and why it's worth learning if you deploy to Azure.
Azure Resource Manager (ARM) is the deployment engine behind every resource you create in Azure, whether you click through the Portal, run an Azure CLI command, or use a proper infrastructure as code tool. Under the hood, ARM works from templates written in JSON that describe what you want deployed and how it should be configured.
ARM JSON templates work, but they’re verbose and repetitive. Loops, conditions and reusable modules are all technically possible, but the syntax is clunky enough that a lot of people avoid infrastructure as code on Azure altogether, or reach straight for a third-party tool instead.
Bicep is Microsoft’s answer to that. It’s a domain-specific language (DSL) that compiles directly to ARM JSON, so it isn’t a replacement for ARM, it’s a much nicer way of writing it. Microsoft announced Bicep in 2020, and it’s now the recommended way to author infrastructure as code for Azure.
What is Bicep
Bicep doesn’t replace ARM, it sits on top of it. When you run bicep build, or deploy a .bicep file directly, it compiles to the exact same ARM JSON that ARM has always used. There’s no new runtime and no new deployment engine, just a friendlier authoring layer.
Compared to writing ARM JSON by hand, Bicep gives you:
- Much more concise syntax, with far less boilerplate per resource
- Native support for loops, conditions and string interpolation
- Modules, so you can break a large deployment into small, reusable pieces
- Type safety and IntelliSense in VS Code, including validation against the actual Azure resource provider schemas
- Comments, which ARM JSON never supported
Bicep is free, open source, and maintained on GitHub. It’s had full Microsoft support since version 0.3, and it’s had feature parity with ARM templates for a long time now, so there’s little reason left to write raw ARM JSON by hand.
Use cases for Bicep
Bicep is worth reaching for any time you’re deploying Azure resources repeatedly, or need environments to stay consistent:
- Standing up repeatable environments. Parameterise a Bicep file once and use it to deploy dev, test and prod from the same underlying template.
- Platform and landing zone deployments. Bicep is the basis for most modern Azure landing zone approaches, often built from Azure Verified Modules rather than from scratch.
- CI/CD pipelines. Deploying infrastructure changes through Azure DevOps or GitHub Actions alongside your application code, instead of clicking through the Portal.
- Sharing modules across a team. Once a resource pattern is right, wrap it in a module and reuse it, rather than copying and pasting JSON between projects.
- Migrating existing ARM templates. Bicep can decompile existing ARM JSON, so you don’t have to start from a blank file if you’re already invested in ARM.
If you’re Azure-only and want first-party tooling and support, Bicep is generally the easiest starting point. If you’re managing multiple clouds, Terraform is still worth considering, but for pure Azure work Bicep’s authoring experience is hard to beat.
Best resources for learning Bicep
- Fundamentals of Bicep: Microsoft Learn’s own structured training path, free and hands-on.
- Bicep documentation: the official reference for syntax, functions and best practices.
- Azure/bicep on GitHub: the source, plus the issue tracker if you want to see what’s being worked on.
- Azure Verified Modules: prebuilt, Microsoft-maintained modules that follow Well-Architected Framework best practice, worth using instead of writing everything from scratch.
- John Savill’s Technical Training on YouTube: long-form, genuinely deep walkthroughs if you prefer video.