Azure / Azure/Azure-Landing-Zones

Error: unable to build authorizer for Resource Manager API

Open
#464 1 comment 0 reactions 0 assignees View on GitHub
Transfer From: caf-enterprise-scale :arrow_right:
Dominant language
PowerShell
Stars
96
Forks
70
Avg merge
3d 1h
Merged PRs (30d)
7

Description

### Community Note

- Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment

### Versions

**terraform**:
Terraform v1.9.5

**azure provider**:
version = "~> 3.107"

**module**:
version = "6.2.0"

### Description

Hi Everyone

I am trying to use the caf-enterprise-scale module to deploy the landing zone structure. I have copied the templates below.
https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/wiki/%5BExamples%5D-Deploy-using-multiple-module-declarations-with-orchestration
After I created those files and folders and tried to run terraform plan, but it was an error that as the below contents

│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: could not parse Azure CLI version: launching Azure CLI: exec: "az": executable file not found in %PATH%

│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on main.tf line 15, in provider "azurerm":
│ 15: provider "azurerm" {

Could someone help me to take a look into this?

Thanks a lot

#### Describe the bug

my main.tf
===========================
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.107"
}
}
}

provider "azurerm" { ## <===== this is line 15
features {}
}

data "azurerm_client_config" "current" {}

========================================
#### Steps to Reproduce

1. step 1

terraform init

Terraform has been successfully initialized!

2. step 2

terraform plan

3. you get it...

│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: could not parse Azure CLI version: launching Azure CLI: exec: "az": executable file not found in %PATH%

│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on main.tf line 15, in provider "azurerm":
│ 15: provider "azurerm" {



│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: could not parse Azure CLI version: launching Azure CLI: exec: "az": executable file not found in %PATH%

│ with module.core.provider["registry.terraform.io/hashicorp/azurerm"],
│ on modules\core\main.tf line 15, in provider "azurerm":
│ 15: provider "azurerm" {

#### Screenshots

#### Additional context

Contributor guide

Open the contributing guide

Research direction

Start with the provider blocks in main.tf and modules/core/main.tf, then run terraform plan using the listed Terraform and azurerm versions to confirm the authorizer failure. Compare the repository's Azure and Terraform guidance with the reproduction; done means identifying a repository-owned documentation or configuration change, since the issue currently reports an environment error without naming a project file to modify.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.