Terraform on Azure

The Basics

When customers begin working with Azure they usually log into the portal and start to build things using the GUI.  After building their resources they notice they can download a template of their newly configured resource. Azure exports an ARM template that can be used to automate your next build.  Customers love the idea of automation and what that can do to help them leverage the cloud.

That’s a great starting point, then you start looking at ARM templates and realize that it is written in JSON. Okay, that adds in an element of learning.  Then when you deploy the ARM template you find that it fails, but why?  Essentially, you’re learning a new technology but there are some specific limiters in cloud adoption and skilling up.  Ideally though, this same person is managing an on-premises infrastructure and maybe other clouds.  They’ve hit a technical blocker.

Let me introduce Terraform, an open source tool created by Hashicorp that helps to remove the blockers that many encounters when adopting cloud technologies. 

In this series of articles, I am going to introduce Terraform and break down different components of how it works, in bite sized chunks.  Terraform is an open source product, so new features are constantly being added to its capability. 

As mentioned, Terraform is an open source tool created by Hashicorp that users HCL (Hashicorp Configuration Language), based on GO.  Essentially, it’s much much simpler to read and learn over JSON.  Which is instrumental in learning how to write scripts, especially for someone that may not have a developer’s background.  Terraform is a tool that you can use to deploy resources into your infrastructure using what they call providers.  You’re probably thinking, so what?  I can do that with the tools I have today: PowerShell, Ansible, CloudFormation, etc. 

Terraform doesn’t just deploy resources, it has the additional benefits:

  • Build resources, make changes and call existing resources
  • Scalability
  • Encourages collaboration
  • Enables governance
  • Reproducible
  • Enable CI/CD (Continuous Integration/Continuous Deployment)

This blog is going to walk you through various components of Terraform using a series of videos. I have documented the references that were made in the videos.  Follow the links to cover off each topic.  All of these videos focus on deploying to Azure.  In order to other environments/clouds, the same concepts can be used, re-writing the scripts to fit that provider (AWS, GCP, VMware, etc).

Let’s look at the first video covering off Terraform on Azure – the basics:https://channel9.msdn.com/Shows/DevOps-Lab/Deploying-your-Azure-Infrastructure-with-Terraform?term=terraform&lang-en=true

After you’ve watched the above video and are comfortable with the basics of Terraform, you can go into greater detail with the other topics below:

Terraform State File – Managing remote state for securing and scaling your deployments

Terraform Modules – Deploying re-usable code

Terraform and Azure DevOps – Delivering CI/CD deployments – Link Coming Soon! In the meantime you can watch the video on Channel9

Terraform and Github Actions – Delivering code from your repo – Link Coming Soon! In the meantime, you can watch the video on Channel9

This blog is part of Azure Week. Check it out for more great content!

About the Author:

April is a senior cloud advocate for Microsoft specializing in application transformation and DevOps ways of working. Her focus is working on Microsoft Azure to take customers of a journey from legacy technology, to serverless and containers, where code comes first, while enabling them to take full advantage of DevOps. April was previously a cloud consultant and solution architect for various partners in the UK and brings her years of experience in helping customers plan their journey.

In April’s spare time she spends time outdoors hiking, skiing or scuba diving.  She is also a triathlete competing in Ironman and Half Ironman triathlons.

April is often asked to present at events to showcase the latest Microsoft technologies and also to present live demos that are industry specific and applicable to real life use cases.  


Edwards, A. (2021). Terraform on Azure. Available at: https://azapril.dev/2020/03/16/terraform-on-azure/ [Accessed: 7th July 2021].

Share this on...

Rate this Post: