Skip to content

Commit e179fca

Browse files
HJ HangHJ Hang
authored andcommitted
Update AKS Arc Terraform doc for az login
1 parent 2e6b67a commit e179fca

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

AKS-Arc/create-clusters-terraform.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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`](https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#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+
Please make sure you've run [`az login`](https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-login) and authenticate to Azure before this step, otherwise there will be failure when applying the Terraform plan. 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)