Coder Perfect

Comparison of Azure Bicep to the ARM template


I came upon an article about Azure Bicep and thought it was interesting –

The JSON syntax used by Azure Resource Manager and ARM Templates can be difficult to deal with. Azure Bicep is a Domain Specific Language (DSL) that provides a transparent layer over Azure Resource Manager and ARM Templates, allowing for a simpler code syntax and improved modularity and reusability. Authoring Azure IaC with Azure Bicep has a few advantages over using ARM Template JSON.

I’d like to learn more about the differences between the ARM template and Azure Bicep, such as their benefits and drawbacks, restrictions, and use cases.

Asked by Aatif Akhter

Solution #1

I believe the official Bicep GitHub repository includes pretty much all of the answers you’re looking for.

Some extracts:

Extracts have been updated because it is now ready for production.

Answered by Alex AIT

Solution #2

BICEP, in my opinion, is best thought of as a simpler and less error-prone technique to produce ARM templates. In the end, the BICEP tool is merely a transpiler, which means it converts BICEP files into a single ARM template that can be deployed as usual. You may always utilize the most recent resource management API version and characteristics because it doesn’t introduce any further layers of abstraction.

I’m quite thrilled about it now that I’ve played with it a little. Prior to BICEP, I was utilizing linked templates for modularity and code reuse whenever possible, but wrangling huge and verbose JSON files was a pain.

With the VSCode BICEP extension and the efforts Microsoft have put into intellisense and linting of BICEP, plus the ability to quickly see the ARM output, I think we’ll enjoy significant productivity increases.

Furthermore, the BICEP decompiler appears to be a very useful tool for converting existing ARM templates to BICEP.

In the past, RM templates have been a source of annoyance and grief, but BICEP represents a vast improvement. Obviously, Terraform is excellent in this area as well, but unless you’re explicitly multi-cloud and multi-resource provider, I believe BICEP is the better option.

Answered by Ben Dyer

Solution #3

The BICEP template syntax is far more user-friendly than the ARM template syntax. BICEP is a format that combines Yaml, TS, and Js without the use of unnecessary punctuation. Bicep is a markup language similar to CSS that includes loops, if statements, ternary operations, and a syntax validation plugin for Visual Studio Code. Bicep still requires the user to grasp Azure Resource Manager “resources” (a Bicep term), but it gives the devops monkey a much sweeter syntax sugar to work with than the error-prone json jibberish “,”; Bicep also adds support for non-Json comments. Bicep is also safer to use with the -c (“check sanity”) option because everything is scoped to the ResourceGroup level by default.

Because it is a transpiler that produces ARM templates but adds higher-level features such as loops, inclusions, and symbolic references, BICEP provides feature parity with ARM. Bicep’s base language is ARM, which is also used by terraform and self-managed K8 auto-scaling.

One disadvantage is that BICEP transpiles into ARM, thus if you have errors in your bicep code, you may need to learn ARM to figure out what went wrong.

Answered by Brian Horakh

Solution #4

When you come into problems with TF, I believe this flaw is easier to fix than troubleshooting.

The link between ARM templates and BICEP is now simple and one-to-one, which is quite convenient. Unfortunately, working with Azure necessitates knowledge of the Azure REST API Specifications as well as the ARM Tempate. However, I prefer Bisp since I don’t want to have to deal with ARM Tempate all of the time.

My Azure Life was made happier by Bicep.

Answered by Takekazu Omi

Post is based on