Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.33 KB

get-started-windows-bash.md

File metadata and controls

60 lines (41 loc) · 2.33 KB
title description keywords ms.topic ms.date ms.custom adobe-target
Install Terraform on Windows with Bash
Learn how to install Terraform on Windows with Bash
terraform azure cli devops install configure windows interactive login rbac service principal automated script
how-to
08/07/2021
devx-track-terraform, mode-api, devx-track-azurecli
true

Install Terraform on Windows with Bash

[!INCLUDE Terraform abstract]

This article presents you with the options to authenticate to Azure for use with Terraform.

In this article, you learn how to:

[!div class="checklist"]

  • Install the Git Bash terminal emulator
  • Install Azure CLI
  • Install Terraform
  • Configure your environment to run Terraform on Windows
  • Understand common Terraform and Azure authentication scenarios
  • Authenticate via a Microsoft account from Cloud Shell (using Bash or PowerShell)
  • Authenticate via a Microsoft account from Windows (using Bash or PowerShell)
  • Create a service principal using the Azure CLI
  • Create a service principal using Azure PowerShell
  • Specify service principal credentials in environment variables
  • Specify service principal credentials in a Terraform provider block

1. Configure your environment

[!INCLUDE open-source-devops-prereqs-azure-subscription.md]

2. Install a terminal emulator

There are many options on Windows to run bash commands, including Git Bash and Windows Terminal. This article has been tested using Git Bash. Download and install Git Bash.

3. Install the Azure CLI

Install the Azure CLI. This article was tested using Azure CLI version 2.26.1.

4. Install Terraform for Windows

[!INCLUDE install-terraform-on-windows.md]

5. Authenticate Terraform to Azure

[!INCLUDE authenticate-to-azure.md]

Troubleshoot Terraform on Azure

Troubleshoot common problems when using Terraform on Azure

Next steps

[!div class="nextstepaction"] Create Azure resource group