I try to apply terraform plan with terraform apply
. But when I run the command I get the following error
Error: Error building AzureRM Client: Error populating Client ID from the Azure CLI:
No Authorization Tokens were found -
please ensure the Azure CLI is installed and then log-in with `az login`.
I do have the Azure CLI installed and I'm logged in with az login
. When I run az login
I am redirected to the landing page where I am able to log in just fine.
Also terraform init
works without any problems.
Below my terraform file:
provider "azurerm" {
version = "1.38.0"
}
I also tried to provide subscription and tenant IDs but it didn't help:
provider "azurerm" {
version = "1.38.0"
subscription_id = "00000000-0000-0000-0000-000000000000"
tenant_id = "00000000-0000-0000-0000-000000000001"
}