Error: Error building AzureRM Client: Azure CLI Authorization Profile was not found. Please ensure the Azure CLI is installed and then log-in with `az login`.
See original GitHub issueI am getting the bellow error when running terraform plan. Did anyone face the same issue ? I am able to login using az login as well.
Error: Error building AzureRM Client: Azure CLI Authorization Profile was not found. Please ensure the Azure CLI is installed and then log-in with `az login`.
on main.tf line 1, in provider "azurerm":
1: provider "azurerm" {``
I am using WSL**, and I have installed azure cli from MS docs. Bellow is my az -version for reference.
az --version azure-cli 2.6.0 *
command-modules-nspkg 2.0.3 core 2.6.0 * nspkg 3.0.4 telemetry 1.0.4
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Terraform: Azure CLI Authorization Profile was not found ...
azurerm: Error building AzureRM Client: Azure CLI Authorization Profile was not found. Please ensure the Azure CLI is installed and then log-in ......
Read more >Error building AzureRM Client: Azure CLI ... - HashiCorp Discuss
I am able to create Azure VM successfully using terraform CLI. ... Please ensure the Azure CLI is installed and then log-in with...
Read more >Azure CLI Authorization Profile was not found - MSDN
provider.azurerm: Error building AzureRM Client: Azure CLI ... Please ensure the Azure CLI is installed and then log-in with `az login`.
Read more >Error populating Client ID from the Azure CLI: No ...
... building AzureRM Client: Error populating Client ID from the Azure CLI: No Authorization Tokens were found - please re-authenticate using `az login`....
Read more >Using Terraform's Azure provider (azurerm) with GitHub ...
Error building AzureRM Client : obtain subscription() from Azure CLI: ... for the Azure CLI: exit status 1: ERROR: Please run 'az login'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same issue, however it was happening at terraform init stage and deleting the .azure folder didn’t help. What was happening on my end was that although I was able to do az login in WSL, the .azure folder was being saved under the Windows user path instead. What worked for me was to copy the .azure folder in Windows to my WSL user directory and terraform init worked again. Thanks @magodo for the pointer
This is because you are calling
az
installed on Windows, instead of the one installed on WSL. You may follow Install the Azure CLI on Linux to install on Ubuntu.