Chapter 4. Infrastructure as Code with Azure Bicep
In the previous chapters, we’ve been provisioning resources using the Azure CLI, Azure PowerShell, or directly on the Azure portal. However, these are not the only ways to create and manage Azure services. There’s the concept of infrastructure as code (IaC), which helps automate the deployment, management, and configuration of infrastructure. Deployments can be made more consistently and repeatedly by using IaC to specify your infrastructure using code.
This chapter will explore the topic of IaC using Azure Bicep, a declarative domain-specific language (DSL) for delivering Azure resources. Azure Bicep offers the same functionality as conventional JSON templates, but makes Azure Resource Manager (ARM) template development easier by having a more legible and manageable syntax. We will begin by discussing IaC, its advantages, and the reasons it is turning into an essential approach for modern cloud deployments. Then, we’ll go over the syntax, organization, and fundamental elements of the Azure Bicep language. You’ll discover how to create Bicep files to define and deploy resources to Azure.
After that, we’ll talk about how to keep your infrastructure updated and maintained so your deployments remain consistent. Last, we’ll talk about Azure’s best practices for IaC. These best practices will help you manage configurations efficiently, writing clean, secure, and effective Bicep code and integrating IaC into your CI/CD pipelines for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access