gopichand
gopichand

Reputation: 1

Problem while deploying Aks using terraform in Azure

creating Cluster: (Managed Cluster Name "akscluster0132" / Resource Group "aksrg"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'australiasoutheast' and API version '2022-01-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, 20

getting this error. I have registered all the required resource providers and changed the vm size as well

I have tried deploying aks in azure using terraform. But getting the error. how to overcome this issue?

Upvotes: 0

Views: 1457

Answers (3)

I-O
I-O

Reputation: 97

I initially encountered this error message while using HashiCorp Cloud and, after searching through various Git gists, I realized the root cause was in my codebase (provider.tf).

If you're facing this error, it's likely due to the API version you're using, which may no longer be supported. For instance, I was using:

terraform {
  required_providers {
    azurerm = {
      source                = "hashicorp/azurerm"
      version               = "~> 3.19.0"
      configuration_aliases = []
    }
  }
}

To resolve the issue, I updated to a newer version:

terraform {
  required_providers {
    azurerm = {
      source                = "hashicorp/azurerm"
      version               = "~> 3.93.0"
      configuration_aliases = []
    }
  }
}

Updating to the latest supported version should help fix this error.

Upvotes: 0

Sathwik
Sathwik

Reputation: 1

You need to register for Resource providers for that resource under subscription

Open Azure Subscription --> under Settings --> choose Resource providers --> select Register

Upvotes: -1

Manish Bilung
Manish Bilung

Reputation: 11

You should be using the supported API versions instead of the one you are currently using: API version '2022-01-02-preview'

Upvotes: -1

Related Questions