Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 2.24 KB

get-started-cloud-shell-powershell.md

File metadata and controls

57 lines (38 loc) · 2.24 KB
title description keywords ms.topic ms.date ms.custom adobe-target
Configure Terraform in Azure Cloud Shell with Azure PowerShell
Learn how to configure Terraform in Azure Cloud Shell with Azure PowerShell
terraform azure cli devops install configure portal interactive login rbac service principal automated script
how-to
03/18/2023
devx-track-terraform, mode-api, devx-track-azurepowershell
true

Configure Terraform in Azure Cloud Shell with Azure PowerShell

[!INCLUDE Terraform abstract]

This article shows how to get started with Terraform on Azure using Cloud Shell and PowerShell.

In this article, you learn how to:

[!div class="checklist"]

  • Configure Cloud Shell
  • 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. Open Cloud Shell

[!INCLUDE open-cloud-shell.md]

3. Install latest version of Terraform in Azure Cloud Shell

[!INCLUDE install-latest-version.md]

4. Verify the default Azure subscription

[!INCLUDE confirm-default-azure-subscription-or-authenticate.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