Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Infrastructure as Code with Azure Bicep

You're reading from   Infrastructure as Code with Azure Bicep Streamline Azure resource deployment by bypassing ARM complexities

Arrow left icon
Product type Paperback
Published in Feb 2022
Publisher Packt
ISBN-13 9781801813747
Length 230 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Yaser Adel Mehraban Yaser Adel Mehraban
Author Profile Icon Yaser Adel Mehraban
Yaser Adel Mehraban
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1: Getting Started with Azure Bicep
2. Chapter 1: An Introduction to Azure Bicep FREE CHAPTER 3. Chapter 2: Installing Azure Bicep 4. Chapter 3: Authoring Experience 5. Chapter 4: Compiling and Decompiling Bicep Files 6. Section 2: Azure Bicep Core Concepts
7. Chapter 5: Defining Resources 8. Chapter 6: Using Parameters, Variables, and Template Functions 9. Chapter 7: Understanding Expressions, Symbolic Names, Conditions, and Loops 10. Chapter 8: Defining Modules and Utilizing Outputs 11. Section 3: Deploying Azure Bicep Templates
12. Chapter 9: Deploying a Local Template 13. Chapter 10: Deploying Bicep Using Azure DevOps 14. Chapter 11: Deploying Bicep Templates Using GitHub Actions 15. Chapter 12: Exploring Best Practices for Future Maintenance 16. Other Books You May Enjoy

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.

You have been reading a chapter from
Infrastructure as Code with Azure Bicep
Published in: Feb 2022
Publisher: Packt
ISBN-13: 9781801813747
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime