Skip to content

Commit 8d533fe

Browse files
Merge pull request #16993 from hungry1526/main
Update AKS Arc Terraform doc for az login
2 parents 2e6b67a + 3b1f110 commit 8d533fe

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

AKS-Arc/create-clusters-terraform.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to create Kubernetes clusters using Terraform.
44
author: sethmanheim
55
ms.author: sethm
66
ms.topic: how-to
7-
ms.date: 11/15/2024
7+
ms.date: 02/10/2025
88

99
---
1010

@@ -51,7 +51,11 @@ To create an SSH key pair (same as Azure AKS), use the following procedure:
5151

5252
## Sign in to Azure
5353

54-
Terraform only supports authenticating to Azure with the Azure CLI. Authenticating using Azure PowerShell isn't supported. Therefore, while you can use the Azure PowerShell module when doing your Terraform work, you must first [authenticate to Azure](/azure/developer/terraform/authenticate-to-azure).
54+
Terraform only supports authenticating to Azure with the Azure CLI using [`az login`](/cli/azure/reference-index#az-login). Authenticating using Azure PowerShell isn't supported. Therefore, while you can use the Azure PowerShell module when doing your Terraform work, you must first [authenticate to Azure](/azure/developer/terraform/authenticate-to-azure):
55+
56+
```azurecli
57+
az login
58+
```
5559

5660
## Implement the Terraform code
5761

@@ -114,9 +118,9 @@ Run [`terraform init`](https://www.terraform.io/docs/commands/init.html) to
114118
terraform init -upgrade
115119
```
116120

117-
## Create a Terraform execution plan and apply the plan
121+
## Create a Terraform execution plan and apply
118122

119-
Run[terraform plan](https://www.terraform.io/docs/commands/plan.html)to create an execution plan, then run[terraform apply](https://www.terraform.io/docs/commands/apply.html)to apply the output file to your cloud infrastructure:
123+
Make sure you run [`az login`](/cli/azure/reference-index#az-login) and authenticate to Azure before this step, otherwise applying the Terraform plan fails. Run [`terraform plan`](https://www.terraform.io/docs/commands/plan.html) to create an execution plan, then run [`terraform apply`](https://www.terraform.io/docs/commands/apply.html) to apply the output file to your cloud infrastructure:
120124

121125
```terraform
122126
terraform plan -out main.tfplan

0 commit comments

Comments
 (0)