How to build with Terraform: Azure VMs (Windows)

Click for: original source

Have you created an Azure VM via the Azure portal before? If so, how many clicks did it take to do that? Can you do it, again and again, providing the exact same input values to ensure you meet a specific standard? Probably not. You need to automate the process. Create Azure VMs with Terraform! By Adam Bertram.

In this article, you’re going to learn how to get started with Terraform by creating an Azure VM. This tutorial will be a great Terraform Azure example.

The main bits of this guide are:

  • Installing terraform
  • Authenticating to Azure
  • Create a configuration file
  • Build the Azure VM with terraform
  • Clean up

Terraform uses providers to talk to various on-prem and cloud vendors. In this case, you need to configure the Terraform Azure provider. Assuming that you’ve got the Azure CLI installed and already authenticated to Azure, you ned to first create a service principal. Terraform will use the service principal to authenticate and get access to your Azure subscription.

Terraform is a great and free tool to build infrastructure in many different areas. Learning the syntax of HCL is the hardest part of Terraform but honestly, HCL is an intuitive language. If you’re thinking about using a tool like Terraform or ARM temples, for example, learn Terraform. Excellent!

[Read More]

Tags devops app-development web-development programming azure containers