Authenticate to Microsoft Azure while using Terraform

In one of our previous posts, we discussed what is terraform and how we can use install it on the server. Terraform is getting popular day by day to define resource configuration for the applications. One of the providers supported for terraform is Azure Provider which allows one to define Azure Resource configuration using the APIs offered by Microsoft Azure Resource Manager or AzureRM. However, before one can start defining the same, one needs to Authenticate oneself to the Azure. In this blog post, we’ll learn what methods can be used to authenticate oneself against Azure.

1. Configuring the Azure CLI

This method is to be used when one is interactively working with Terraform. Azure CLI or Azure command line interface is a cross platform command line tool offered by Microsoft to work with Microsoft Azure and manage azure resources. Continue reading “Authenticate to Microsoft Azure while using Terraform”

Getting started with Terraform

One of the core philosophies of the DevOps is to treat everything as code. So it does the same with Infrastructure and treats Infrastructure as Code (or IaC). Treating Infrastructure as Code allows one to deploy infrastructure in a predictable and consistent manner, document all changes, mark each change or a group of change as separate version. So all cloud providers have supported this philosophy in some manner. For example, with Microsoft Azure, you can use Azure ARM templates, for AWS you can use Cloud Formation. However, these days, multi cloud deployment scenarios are becoming common. So instead of learning what each cloud provider supports, one can also learn Terraform.   Continue reading “Getting started with Terraform”