Open thiruma0203 opened 2 years ago
@wyunchi-ms , you can see the other properties of Identity were missing and empty userAssignedIdentities was added. Is it the similar issue we are fixing?
Enable-AzAksAddon has the same result. I had an open support ticket with MS on this, and the workaround I was given was to not pipe the cluster object in, and instead just supply the Enable/Disable-AzAksAddon commandlet with -ClusterName and -ResourceGroupName instead.
Description
Cmdlet reference shows an example for removing monitoring addon from AKS cluster. https://docs.microsoft.com/ja-jp/powershell/module/az.aks/disable-azaksaddon?view=azps-7.4.0
However, running below cmdlet returns error. Get-AzAksCluster -ResourceGroupName group -Name myCluster | Disable-AzAksAddon -Name Monitoring
"code":"BadRequest","message":"The request format was u nexpected, a non-UserAssigned identity type should not contain: userAssignedIdentities"
Repro steps:
Azure CLI works fine to remove monitoring addon for the same cluster. az aks disable-addons -a monitoring -n myCluster -g group
Issue script & Debug output
Environment data
Module versions
Error output