#
Configure Terraform in Azure Cloud Shell with Azure PowerShell
#
Configure your environment
- Azure subscription: If you don't have an Azure subscription, create a free account before you begin.
#
Open Cloud Shell
If you already have a Cloud Shell session open, you can skip to the next section.
Browse to the Azure portal
If necessary, log in to your Azure subscription and change the Azure directory.
Open Cloud Shell.
If you haven't previously used Cloud Shell, configure the environment and storage settings.
Select the command-line environment.
#
Get Version of Terraform
Cloud Shell automatically updates to the latest version of Terraform. However, the updates come within a couple of weeks of release.
- Determine the version of Terraform being used in Cloud Shell.
terraform version
#
Verify the default Azure subscription
When you log in to the Azure portal with a Microsoft account, the default Azure subscription for that account is used.
Terraform automatically authenticates using information from the default Azure subscription.
Run az account show to verify the current Microsoft account and Azure subscription.
az account show
Any changes you make via Terraform are on the displayed Azure subscription.