-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
for some reason, right after I changed to a "Pay as you go" subscription in azure, I can't do terraform plan, I've tried everything, and I do mean, EVERYTHING, not even the AI can tell what the issue is,
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: building account: could not acquire access token to parse claims: running Azure CLI: exit status 1: ERROR: Account has previously been signed out of this application.. Status: Response_Status.Status_AccountUnusable, Error code: 0, Tag: 540940121
│ Please explicitly log in with:
│ az login --scope https://graph.microsoft.com/.default
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on main.tf line 10, in provider "azurerm":
│ 10: provider "azurerm"{
│
╵
I've already logged in a million times, I've already used the tennant ID, So I don't know what's going on, I don't know if it's because of my subscription, because of my local config, I don't know, I alrady did a clean project and that worked but now I brought the main.tf file to a clean folder...and it doesn't work
Related command
terraform plan
Errors
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: building account: could not acquire access token to parse claims: running Azure CLI: exit status 1: ERROR: Account has previously been signed out of this application.. Status: Response_Status.Status_AccountUnusable, Error code: 0, Tag: 540940121
│ Please explicitly log in with:
│ az login --scope https://graph.microsoft.com/.default
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on main.tf line 10, in provider "azurerm":
│ 10: provider "azurerm"{
│
Issue script & Debug output
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.0.0"
}
}
}
provider "azurerm"{
features {}
}
resource "azurerm_resource_group" "main" {
name = "spotifymoods_rg"
location = "East US"
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.0.0"
}
}
}
provider "azurerm"{
features {}
}
resource "azurerm_resource_group" "main" {
name = "spotifymoods_rg"
location = "East US"
}
module "SpotifyMoodsApp" {
source = "./modules/staticWebApp"
app_name = "SpotifyMoods"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
}
Expected behavior
to make a plan
Environment Summary
azure-cli in CMD or Powershell
Additional context
No response