-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Unable to login into the Azure portal through terraform #31190
Description
Describe the bug
I have been using the backend block by providing the "access_key" details of the storage account, but it's still prompting for az login. Below is the error message I am currently encountering:
Related command
terraform plan
Errors
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: tenant ID was not specified and the default tenant ID could not be determined: obtaining tenant ID: obtaining account details: running Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on backend.tf line 21, in provider "azurerm":
│ 21: provider "azurerm" {
Issue script & Debug output
terraform plan
Acquiring state lock. This may take a few moments...
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: tenant ID was not specified and the default tenant ID could not be determined: obtaining tenant ID: obtaining account details: running Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on backend.tf line 21, in provider "azurerm":
│ 21: provider "azurerm" {
│
Expected behavior
it should run
Environment Summary
Terraform v1.11.2
on windows_amd64
- provider registry.terraform.io/hashicorp/azurerm v4.25.0
Additional context
No response