Project: Pipeline to Deploy an Azure Virtual Machine

Learn how to create a pipeline to deploy an Azure Virtual Machine.

Enough with the background material. Let’s get started actually building an Azure pipeline to test and deploy an Azure VM using Terraform.

Project overview

In this chapter’s project, you will be creating an Azure DevOps organization and a pipeline using YAML. The pipeline will consist of Terraform code that will create an Azure Virtual Machine. The Terraform code will be deployed from the YAML pipeline and once the pipeline completes successfully, you will have a working Linux virtual machine.

Please note that Azure DevOps organizations are free. For the purposes of this course, there shouldn’t be anything we ask you to do that goes outside of the free-tier.

Tools to have

To follow along with the project in this chapter, please be sure that you have:

  • An Azure Subscription
  • A GitHub account
  • An Azure Storage Account and blob container created. To create these resources, check out this resource.
  • You have created an Azure service principal and have configured Terraform to connect to your Azure subscription. Details on how to do this are here. If you already have the Azure CLI configured, Terraform can also use that service principle.

Building an Azure DevOps organization

Before you can start building a new pipeline in Azure DevOps, you need to create an organization. An organization is used to connect groups of projects. A project is where you start to create all of the pipelines.

Get hands-on with 1400+ tech skills courses.