When I run `terraform plan` I get
Planning failed. Terraform encountered an error while generating this plan.
Error: Failed to retrieve resource
│
│ with module.cluster.module.aks.azapi_update_resource.aks_cluster_post_create,
│ on .terraform\modules\cluster.aks\main.tf line 658, in resource "azapi_update_resource" "aks_cluster_post_create":
│ 658: resource "azapi_update_resource" "aks_cluster_post_create" {
│
│ reading "Resource: (ResourceId \"/subscriptions/<subsription_id>/resourceGroups/dev-resources/providers/Microsoft.ContainerService/managedClusters/<cluster_name>\" / Api Version \"2023-01-02-preview\")":
│ GET https://management.azure.com/subscriptions/<subsription_id>/resourceGroups/dev-resources/providers/Microsoft.ContainerService/managedClusters/<cluster_name>
│ --------------------------------------------------------------------------------
│ RESPONSE 400: 400 Bad Request
│ ERROR CODE: NoRegisteredProviderFound
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "code": "NoRegisteredProviderFound",
│ "message": "No registered resource provider found for location 'switzerlandnorth' and API version '2023-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, 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-08-01, 2022-09-01, 2022-11-01, 2023-01-01, 2023-02-01, 2023-03-01, 2023-04-01, 2023-04-02-preview, 2023-05-01, 2023-05-02-preview, 202
3-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, 2024-02
-01, 2024-02-02-preview, 2024-03-02-preview, 2024-04-02-preview, 2024-05-01, 2024-05-02-preview, 2024-06-01, 2024-06-02-preview, 2024-07-01, 2024-07-02-preview, 2024-08-01, 2024-08-02-preview, 2024-09-01, 2024-09-02-preview, 202
4-10-01, 2024-10-02-preview'. The supported locations are 'australiacentral, australiacentral2, australiaeast, australiasoutheast, brazilsouth, brazilsoutheast, canadacentral, canadaeast, centralindia, centralus, eastasia, eastu
s, eastus2, francecentral, francesouth, germanynorth, germanywestcentral, israelcentral, italynorth, japaneast, japanwest, jioindiacentral, jioindiawest, koreacentral, koreasouth, mexicocentral, newzealandnorth, northcentralus,
northeurope, norwayeast, norwaywest, polandcentral, qatarcentral, southafricanorth, southafricawest, southcentralus, southindia, southeastasia, spaincentral, swedencentral, switzerlandnorth, switzerlandwest, uaecentral, uaenorth, uksouth, ukwest, westcentralus, westeurope, westus, westus2, westus3'."
│ }
│ }
My folder structure like this:
│main
│ ├── module.cluster (custom module)
│ ├── Azure/aks/azurerm module
{
"azure-cli": "2.69.0",
"azure-cli-core": "2.69.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
Namespace RegistrationPolicy RegistrationState
-------------------------- -------------------- -------------------
Microsoft.ContainerService RegistrationRequired Registered
Is there an existing issue for this?
Greenfield/Brownfield provisioning
brownfield
Terraform Version
Terraform v1.10.5 on windows_386
Module Version
9.4.1
AzureRM Provider Version
3.117.0
Affected Resource(s)/Data Source(s)
module.aks.cluazapi_update_resource.aks_cluster_post_create
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
I also found this bug in the azure cli
Azure/azure-cli#23985 (comment)
My az cli version is
Actual Behaviour
~ 1 month ago everything worked without any problems
I met this problem with
Azure/aks/azurerm: v9.1.0after that I decided to update the module version, azurerm, but it didnt resolve the issueSteps to Reproduce
No response
Important Factoids
No response
References
Azure/azure-cli#23985 (comment)