Skip to content

Unable to login into the Azure portal through terraform #31190

@VIU2105

Description

@VIU2105

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

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-Issueact-identity-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions