Unable to build authrorizer for Resource Manager API in Azure local run

Having an issue running any Terraform through Azure CLI Authentication local. I can use Azure CLI to login, set default subscription, and even create a resource group using the CLI syntax fine. When I try to so the same through terraform, I keep getting the same error below:

Planning failed. Terraform encountered an error while generating this plan.

│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: could not parse Azure CLI version: unmarshaling the output of Azure CLI: invalid character ‘C’ looking for beginning of value

│ with provider[“Terraform Registry”],
│ on main2.tf line 10, in provider “azurerm”:
│ 10: provider “azurerm” {

Here is the contents of the main2.tf file:

terraform {
required_providers {
azurerm = {
source = “hashicorp/azurerm”
version = “>= 3.82.0”

provider “azurerm” {

resource “azurerm_resource_group” “rg” {
name = “matttest”
location = “eastus”

Very odd. I’ve uninstalled and reinstalled both Terraform and Azure CLI multiple times.


Anybody have this also?

[educated guess]

The error suggests an issue with parsing Azure CLI output in Terraform. Try updating both Terraform and Azure CLI to their latest versions, check for any special characters in your configurations, and ensure your environment variables are set correctly. If the issue persists, consider running Terraform with TF_LOG=DEBUG for more detailed error messages and consult the Terraform community for similar cases.