Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unable to build authorizer for Resource Manager API #1217

Open
garra1109 opened this issue Dec 13, 2024 · 1 comment
Open

Error: unable to build authorizer for Resource Manager API #1217

garra1109 opened this issue Dec 13, 2024 · 1 comment

Comments

@garra1109
Copy link

garra1109 commented Dec 13, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction 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!

  1. step 2

terraform plan

  1. 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

@garra1109 garra1109 changed the title Bug Report Error: unable to build authorizer for Resource Manager API Dec 14, 2024
@stawik-mesa
Copy link

Is the az cli installed and authorized? Otherwise you can simply authenticate with a service principal or any other documented method.

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/azure_cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants