I am currently unable to update my service principle for my AKS cluster. I am trying to update the credentials by following this guide: https://learn.microsoft.com/en-us/azure/aks/update-credentials
Whenever I run the az aks update-credentials step I get the following error:
Deployment failed. Correlation ID: de7d345a-009b-40f2-95c7-466b9157e481. Category: ClientError; SubCode: InvalidResourceReference; Dependency: Azure Resource Manager; OrginalError Code="InvalidResourceReference" Message="Resource /subscriptions/xxxx/resourceGroups/ICMUS-STAGING/providers/Microsoft.Network/virtualNetworks/ICMUS-STAGING referenced by resource /subscriptions/xxxx/resourceGroups/MC_ICMUS-STAGING-CLUSTER_ICMUS-STAGING-CLUSTER_WESTUS2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-default-41547229-vmss was not found. Please make sure that the referenced resource exists, and that both resources are in the same region." Details=[{"code":"NotFound","message":"Resource /subscriptions/xxxx/resourceGroups/ICMUS-STAGING/providers/Microsoft.Network/virtualNetworks/ICMUS-STAGING not found."}]
I find this error message to be particularly odd
If I go into the Resource Explorer on the portal and navigate to the VMSS referenced in the error message, there is no reference to the missing virtualNetworks. This may be because I moved the VNET to a new resource group. The Resource Explorer in the portal reflects this change, but the CLI is not.
Any clue on how to fix this issue? There seems to be some disconnect with the Resource Explorer.