What is infrastructure as code?

Jay Gordon

What is infrastructure as code?

Microsoft Azure provides you with a number of options to deploy your infrastructure. In the One Dev Question series, Cloud Developer Advocate Abel Wang explains how Azure DevOps provides developer services to support teams to plan work, collaborate on code development, and build and deploy applications. In this video, Abel explains the concepts of Infrastructure as Code (IaC).

To meet these challenges, you can automate deployments and use the practice of infrastructure as code. In code, you define the infrastructure that needs to be deployed. The infrastructure code becomes part of your project. Just like the application code, you store the infrastructure code in a source repository and version it. Anyone on your team can run the code and deploy similar environments.

Azure Resource Manager Templates (ARM)

To implement infrastructure as code for your Azure solutions, use Azure Resource Manager (ARM) templates. The template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax, which lets you state what you intend to deploy without having to write the sequence of programming commands to create it. In the template, you specify the resources to deploy and the properties for those resources.

You can read more information on ARM templates at the following links:

ARM template documentation
Understand the structure and syntax of ARM templates
Azure Quickstart Templates
ARM Template best practices
Tutorial: Create and deploy your first ARM template
Microsoft Learn: Build Azure Resource Manager templates

Hashicorp Terraform

Another really popular method of deploying your infrastructure to Azure is by using Terraform by Hashicorp. Hashicorp Terraform is an open-source tool for provisioning and managing cloud infrastructure. It codifies infrastructure in configuration files that describe the topology of cloud resources. These resources include virtual machines, storage accounts, and networking interfaces. The Terraform CLI provides a simple mechanism to deploy and version the configuration files to Azure.

Terraform is adept at deploying an infrastructure across multiple cloud providers. It enables developers to use consistent tooling to manage each infrastructure definition.

You can read more information on Terraform on Azure at the following links:

Terraform with Azure
Quickstart: Configure Terraform using Azure Cloud Shell
Create a Kubernetes cluster with Azure Kubernetes Service using Terraform
Tutorial: Terraform testing overview

Learn even more!

Continue your education by checking out Microsoft Learn! Learn new skills and discover the power of Microsoft products with step-by-step guidance. Start your journey today by exploring our learning paths and modules.

Check out the Automate cloud resource management module to help you get started using Infrastructure as Code on Azure. Maybe you’re new to Azure and want the fundamentals? Azure Fundamentals teaches you basic cloud concepts, provides a streamlined overview of many Azure services, and guides you with hands-on exercises to deploy your very first services for free.


Discussion is closed.

Feedback usabilla icon