Thoughts on Azure Bicep

Brian Horakh
2 min readApr 5, 2021

--

So I spent a few days learning Azure Bicep and the broader Azure Resource Manager “ARM” templates.

Bicep transpiles (like typescript decorators) into ARM templates but adds higher level functionality such as loops and symbolic references. Bicep is currently in version 0.3 and so the docs are sparse and examples still have a few rough edges but it’s considered mainstream supported now.

Bicep also has an amazing VS Code plugin that uses intellisense to help figure out what field is required, although I’ll be the first to admit that sometimes the description of the field leaves a bit to be desired i.e. “encryptionProperties” in a container group has a sparse description of “Encryption Properties” with no context (I finally arrived at the conclusion that it was something for Dot.Net and NuGet code libraries).

I remember reading about it back when Bicep was announced and I was like “wtf” another not-javascript not-yaml not-json not-html not-css not-lua not-python scripting language WHY should I ever bother? Bicep proved me wrong, it’s clean, and uncompromisingly easy to learn and read. It’s variable declarations and parameter syntax improves ARM so massively that any complexity remaining is (mostly) due to the underlying complexity from the resource type you’re working with.

I ended up spending a bit of time really deep diving into it so I could gain enough of an understanding that solving future problems would be straightforward. I ended up contributing a page of “Debugging tips” to the tutorial (section 08) which is currently pending a pull request approval.

The conclusion I came to at the end is that if you’re creating simple containers or a situation where there is a YAML shortcut for a one-off then probably use that because Bicep has a non-trivial learning curve. If you expect to be doing regular container orchestration tasks on Azure then Bicep is absolutely worth learning.

If you want to read my Bicep debugging tips:
https://github.com/elasticdotventures/bicep/blob/patch-2/docs/tutorial/08-debugging.md

I’ll update the link if it ends up getting accepted into the tutorial.

--

--