Why was it created?
Now is the time to delve into why Microsoft felt there was a need to create another revision on ARM templates, which will be covered in this section. In addition, we will have a look at the rationale behind when to use third-party tools such as Pulumi or Terraform, and when to go with Bicep.
Why create a new revision?
ARM templates had some issues that were causing many customers to complain about the usage of JSON and its limitations. The first thing that was causing some pain was the way validation worked in ARM templates. Often, the template validation passed but the deployment would fail.
Another reason was not having to comment in the template, especially if the deployment model was very complex. I am not a fan of commenting in code or any script for that matter, but the lack of commenting, even small comments to deliver a hint to the next maintainer or team member, was not something people were happy about.
And the last valid reason was how parameters would be duplicated for different resources or environments. Given the fact that ARM templates themselves are reusable, this was not ideal and would make maintaining the parameter files a nightmare, although they might contain the same value.
To overcome these issues, Microsoft started to investigate different existing tools and new ways to enhance the functionality of ARM templates and, in the end, they ended up with the Bicep language, with its own syntax.
They mentioned in their GitHub repository that they went through more than 120 customer calls and surveyed their Most Valuable Professionals (MVPs) network, and evaluated and even prototyped a version written in TypeScript, but eventually decided that Bicep should have its own syntax.
And to me, it is a valid reason, since the majority of companies will use DevOps engineers or even cloud enablement teams to implement and maintain the IaC. Many of those people do not have familiarity with programming languages, which means that using a high-level language would incur a learning curve many companies cannot afford. On the other hand, many of those folks know scripting languages and can learn Bicep really fast without too much effort.
What about current third-party tools?
Another question people usually ask is why they can't use current tools, such as Pulumi or Terraform. For Pulumi, I have already explained the barrier of knowing a required programming language and the learning curve that would follow. For those who are comfortable using Terraform or are already using it, there would not be any reason to shift to Bicep at all. Of course, that is whether you are happy to pay the price to use Terraform Cloud when Bicep is a free tool.
In fact, Microsoft has already invested in creating a set of documentation to streamline the learning material in their DevOps site regarding using Terraform on Azure, which can be found at https://azure.microsoft.com/en-au/solutions/devops/terraform.
That said, many organizations – some of which I personally have worked with – are using ARM templates and are looking for a solution with the least overhead to move on. For those people, Bicep works well because they are already familiar with concepts such as built-in functions, types, API versions, and so on.
Furthermore, for those who have not started their journey in IaC, it would be much easier to start with something that has integration with the tools they would use, such as the Azure CLI and Visual Studio Code, with as little learning as possible, keeping in mind that Bicep is now supported by Microsoft support plans.