What The Hack: Infrastructure As Code with Bicep

Introduction

DevOps is a journey not a destination. Implementing Infrastructure-as-Code is one of the first steps you will need to take!

When implementing an application environment in the cloud, it is important to have a repeatable way to deploy the underlying infrastructure components as well as your software into the target environment. This includes resources such as:

The best way to make deployments repeatable is to define them with code, hence the term “Infrastructure as Code” (aka IAC). There are multiple technologies that enable you to achieve this. Some of these include:

This hack is focused on using Bicep to implement your IaC. It does not mean this is the only way to implement IaC, it’s just one of many ways. If you want to learn how to do IaC in Azure with other technologies, try one of our other IaC hacks for ARM Templates & PowerShell DSC, Terraform or Ansible.

Learning Objectives

This hack will help you learn:

The challenges build upon each other incrementally. You will start by creating a basic Bicep template to get you familiar with the tools & syntax. Then you extend your template incrementally to deploy multiple infrastructure resources to Azure.

Challenges

Prerequisites

You will want to prepare your machine with the following to help complete the Challenges for this hack:

Contributors