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

Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'westeurope' and API version '2022-03-02-preview' for type 'managedClusters' #28499

Open
hasanm64 opened this issue Mar 4, 2024 · 18 comments
Labels
Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue
Milestone

Comments

@hasanm64
Copy link

hasanm64 commented Mar 4, 2024

Describe the bug

Hi All,

I am facing issue with managedclusters resource. I am not mentioning any API version. Still it gives me error related to API version.
I am running terraform validate command with below versions.
terraform: 1.0.0
Azurerm: 3.20

NOTE:

  1. This was working fine till February 22nd when I last ran it.
  2. I am already using latest version of azurecli..2.57.0.
  3. I donot see this error when using azurerm version of 2.81 and tf version 0.15.5

Related command

terraform validate

Errors

│ Error: retrieving Cluster: (Managed Cluster Name "aks-cluster1" / Resource Group "my-rg"): containerservice.ManagedClustersClient#Get: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'westeurope' and API version '2022-03-02-preview' for type 'managedClusters'. The supported api-versions are '2017-08-31, 2018-03-31, 2019-02-01, 2019-04-01, 2019-06-01, 2019-08-01, 2019-10-01, 2019-11-01, 2020-01-01, 2020-02-01, 2020-03-01, 2020-04-01, 2020-06-01, 2020-07-01, 2020-09-01, 2020-11-01, 2020-12-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-07-01, 2021-08-01, 2021-09-01, 2021-10-01, 2022-01-01, 2022-02-01, 2022-03-01, 2022-04-01, 2022-06-01, 2022-07-01, 2022-07-02-preview, 2022-08-01, 2022-08-02-preview, 2022-08-03-preview, 2022-09-01, 2022-09-02-preview, 2022-10-02-preview, 2022-11-01, 2022-11-02-preview, 2023-01-01, 2023-01-02-preview, 2023-02-01, 2023-02-02-preview, 2023-03-01, 2023-03-02-preview, 2023-04-01, 2023-04-02-preview, 2023-05-01, 2023-05-02-preview, 2023-06-01, 2023-06-02-preview, 2023-07-01, 2023-07-02-preview, 2023-08-01, 2023-08-02-preview, 2023-09-01, 2023-09-02-preview, 2023-10-01, 2023-10-02-preview, 2023-11-01, 2023-11-02-preview, 2024-01-01, 2024-01-02-preview'. The supported locations are 'australiacentral, australiacentral2, australiaeast, australiasoutheast, brazilsouth, brazilsoutheast, canadacentral, canadaeast, centralindia, centralus, eastasia, eastus, eastus2, francecentral, francesouth, germanynorth, germanywestcentral, israelcentral, italynorth, japaneast, japanwest, jioindiacentral, jioindiawest, koreacentral, koreasouth, northcentralus, northeurope, norwayeast, norwaywest, polandcentral, qatarcentral, southafricanorth, southafricawest, southcentralus, southindia, southeastasia, swedencentral, switzerlandnorth, switzerlandwest, uaecentral, uaenorth, uksouth, ukwest, westcentralus, westeurope, westus, westus2, westus3'."

Issue script & Debug output

NA

Expected behavior

It should retrieve the resource details

Environment Summary

Azurecli: 2.57
terraform: 1.0.0
Azurerm: 3.20

Additional context

No response

@hasanm64 hasanm64 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 4, 2024
Copy link

Hi @hasanm64,

This is a known issue.

Please follow #23985 (comment) to get temporary workaround.

If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.

Copy link

Hi @hasanm64
Find similar issue #28368.

Issue title az resource show can intermittently fail if the service is currently rolling out a manifest update that adds a new API version
Create time 2024-02-14
Comment number 4

Please confirm if this resolves your issue.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Mar 4, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2024

Thank you for opening this issue, we will look into it.

@hasanm64
Copy link
Author

hasanm64 commented Mar 4, 2024

/clibot unresolve
opening this as there is no resolution yet and this is blocking many of our activities.

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2024

Please open this issue in terraform repo

@yonzhan yonzhan closed this as completed Mar 4, 2024
@hasanm64
Copy link
Author

hasanm64 commented Mar 4, 2024

/clibot unresolve
hi @yonzhan ,
This was working few days ago with same terraform(1.0.0) and azurerm (3.20) version.
It started to fail since 2 days complaining about the API version in cli.

@yonzhan yonzhan added this to the Backlog milestone Mar 4, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 4, 2024

Please let me know which CLI command you use?

@hasanm64
Copy link
Author

hasanm64 commented Mar 4, 2024

I am not passing any particular command. Terraform fetches the resources in backend when we use terraform validate command on our azure subscription.

@hasanm64
Copy link
Author

hasanm64 commented Mar 4, 2024

and just now I tried with azurerm version 3.90 instead of 3.20 and it works fine. Not sure at which exact version it is breaking.

@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Mar 4, 2024
@jsntcy
Copy link
Member

jsntcy commented Mar 5, 2024

Please provide more details related to CLI commands.

@IhorKamniev
Copy link

IhorKamniev commented Mar 5, 2024

I'm also facing this issue when running terraform plan.
Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'westus' and API version '2022-01-02-preview' for type 'managedClusters'.

@ramxis
Copy link

ramxis commented Mar 7, 2024

I am also facing the same issue when i use terraform plan or terraform apply

@dparv
Copy link

dparv commented Mar 8, 2024

I am facing this with ARM templates as well, the workaround mentioned in #23985 (comment) can't be applied with this workflow.

@seanslma
Copy link

seanslma commented Mar 11, 2024

I am also facing the same issue when running terraform plan

Code="NoRegisteredProviderFound" 
Message="No registered resource provider found for location 'australiaeast' 
and API version '2022-03-02-preview' for type 'managedClusters'. 

@sr185401
Copy link

I'm also facing this issue when running terraform plan. Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'westus' and API version '2022-01-02-preview' for type 'managedClusters'.

facing the same issue today, do we have any solution for this?

@ramxis
Copy link

ramxis commented Mar 11, 2024

the issue went away for me when i set the azurerm to v 3.94.0.

# Configure the Azure provider
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "3.94.0"
    }
  }
  required_version = ">= 1.1.0"
}

@michaelschuett-tomtom
Copy link

the issue went away for me when i set the azurerm to v 3.94.0.

# Configure the Azure provider
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "3.94.0"
    }
  }
  required_version = ">= 1.1.0"
}

Thanks this fixed it for me. I was on 3.0.4 previously.

@ChuckkNorris
Copy link

Thank you, @michaelschuett-tomtom!
This fixed it for me - I was using v3.0.4 and encountering the 400 error, but updating to 3.94.0, running terraform init -upgrade, then running apply again provisioned my AKS cluster as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

10 participants