Happy 5th Birthday Bicep!
5 years ago, on the 13th March 2020, the first commit was made to the azure/bicep repository. Happy Birthday Bicep!
Prior to this, there had been lots of conversations about where to go next with Microsoft’s Infrastructure as Code (IaC) tooling. ARM templates had been around since 2014, and had significant use, but there were fairly significant issues with how complex they were to use and the steep learning curve to get started with. From these issues, Bicep was born.
Bicep is ARM
Bicep was introduced to provide a much more user friendly way to write IaC templates that was easier for begginers to get started with. It also wasn’t a brand new implementation. Rather than developing a new language from the ground up, Bicep instead provided a way to generate ARM templates, but with a simpler language. This was a clever solution to the problem as it meant there was no need to built a new solution from the ground up, or change anything on the resource provider side. Resource providers are the way that Azure product teams expose their products to the Azure Resource Manager platform to manage deployments.
Bicep allows you to write templates in a much simpler language, but when you come to deploy them the Bicep engine transpiles the code to into ARM, and it’s ARM that is actually run to deploy the resources. Back in the beggining, you needed to run the Bicep Build
command to create the required ARM templates, and then deploy the ARM templates. Today, the tooling has improved and abstracted things even further, so you never really see the ARM templates at all, it all goes on behind the scenes. However, if you want to take a look under the covers and see the complex JSON that Bicep is saving you from, the Bicep Build
command still works.
New Features
As well as simplifying the language, the switch to Bicep also allowed for the introduction of new features to make developers lives easier. In the last 5 years we have seen:
- Reusable modules with a means of distribution using a Bicep Module Registry in Azure Container Registry
- Conversion tool for ARM to Bicep
- Bicep Parameter Files
- User Defined Types
- Environment Variables in Parameter Files
- Decorators
- Using statements
- Recursive type definitions
- Using expressions in parameter files
- MS Graph Provider for Bicep
These are just some of the highlights. The Bicep team have done a great job of resolving issues as well as adding functionality.
Azure Verified Modules
Another great new feature that has come off the back of Bicep is Azure Verified Modules(AVM). Bicep made it much easier to create and distribute reusable modules of Infrastructure as Code. AVM is a program and repository of Bicep (and Terraform) modules that meet a set of standards and are high quality and secure by default.
Bicep and Terraform
Bicep’s syntax is similar to Terraform HCL, and one of the very regular comments seen after the initial release was “why do I need this, I already have Terraform” or “I don’t want to switch from Terraform”. These comments all miss the point, Bicep isn’t intended to bring people over from Terraform, it’s to help the people who aren’t using any IaC at all yet. It’s to try and lower the barrier of entry for people to get started with IaC and to improve the lives of people who are using ARM templates, or who are locked into the Azure ecosystem.
I even wrote a small rant about this back in 2022 - Bicep is Not Trying to Compete with Terraform.
Getting Started with Bicep
If you’re starting your Infastructure as Code journey then Bicep is a great place to start. It’s a simpler language than ARM, and doesn’t have the complexity of state management that Terraform brings. It has it’s limitations, the obvious one being that it only deals with Azure and Azure adjacent (such as MS Graph) resources, so it will depend on the scope of your deployments.
I have put together a course to help you get started with Bicep in a real-world setting. You can find it here - Bicep for Real.
If you want to get involved with the core Bicep project itself, you can join the Bicep Community Call starting with a birthday special this month.
Happy Birthday
So happy birthday Bicep and thanks for getting us to a better place with Azure’s native IaC tooling. Sure there are things that could be improved and things that don’t work like they should, but compared to where we were with ARM templates, it’s significantly better. Thanks to the Bicep team at Microsoft who have always been happy to listed to comments (and criticism) and take them onboard to improve things in the future.