viya4-iac-azure
viya4-iac-azure copied to clipboard
(IAC-660) error while upgrading k8s from 1.21.7 to 1.22.4
Terraform Version Details
No response
Terraform Variable File Details
No response
Steps to Reproduce
I created 1.21.7 K8S cluster on Azure and ran a deployment. I scaled the Viya deployment down and tried to upgrade K8S version to 1.22.4 via terraform. I got this error in the middle of updating cluster. Any idea about this?
Expected Behavior
K8S version of cluster be updated by 1.22.4
Actual Behavior
I got an error:
╷
│ Error: updating Managed Kubernetes Cluster "jkaks-aks" (Resource Group "jkaks-rg"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidIdentityValues" Message="Invalid value for the identities '/subscriptions/f4bf3627-6945-43bd-901f-2e857b8e851f/resourceGroups/jkaks-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/jkaks-aks-identity'. The 'UserAssignedIdentities' property keys should only be empty json objects, null or the resource exisiting property."
│
│ with module.aks.azurerm_kubernetes_cluster.aks,
│ on modules/azure_aks/main.tf line 2, in resource "azurerm_kubernetes_cluster" "aks":
│ 2: resource "azurerm_kubernetes_cluster" "aks" {
│
Additional Context
# azurerm_user_assigned_identity.uai[0]:
resource "azurerm_user_assigned_identity" "uai" {
client_id = "12132b95-88ec-4c42-9ee7-b8b479f9a7de"
id = "/subscriptions/f4bf3627-6945-43bd-901f-2e857b8e851f/resourceGroups/jkaks-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/jkaks-aks-identity"
location = "eastus"
name = "jkaks-aks-identity"
principal_id = "394fcb64-64d7-4b29-a94a-179b03ffc157"
resource_group_name = "jkaks-rg"
tags = {}
tenant_id = "b1c14d5c-3625-45b3-a430-9552373a0c2f"
}
References
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@jkmin96 was there ever any follow u on this? Today while updating cluster from 1.19.13 i am receiving the same error:
Error: updating Managed Kubernetes Cluster "greenmonthly-aks" (Resource Group "greenmonthly-rg"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidIdentityValues" Message="Invalid value for the identities '/subscriptions/fbbfba38-3ea8-4da4-a3d9-e49bd7264920/resourceGroups/greenmonthly-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/greenmonthly-aks-identity'. The 'UserAssignedIdentities' property keys should only be empty json objects, null or the resource exisiting property."
I didn't try any after reporting this issue since there was no work from dev team.
@thpang and @sayeun, could you please check if anyone in your team checked on this?
An internal ticket was created for a similar issue for upgrading from 1.21.X to 1.22.4 . Currently, it is in the backlog.
After updating the provider azurerm version was updated from 2.62.0 to 3.26.0, this bug was not reproducible. The related internal ticket was closed after testing. Closing this issue.