Updating AKS node pools thru ARM template doesn't work

Tim Jin 31 Reputation points

Based on https://learn.microsoft.com/en-gb/azure/aks/use-multiple-node-pools#manage-node-pools-using-a-resource-manager-template, I created a aks-agentpools.json by copying the code there and provided clusterName as "tmp-apps-dev-aks-02-12" in parameter json file. The AKS "tmp-apps-dev-aks-02-12" has been created previously

While deploying, it raised error:
{"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: 'The template reference 'tmp-apps-dev-aks-02-12' is not valid: could not find template resource or resource copy with this name. Please see https://aka.ms/arm-template-expressions/#reference for usage details.'.","additionalInfo":[{"type":"TemplateViolation","info":{"lineNumber":0,"linePosition":0,"path":""}}]}}

It seems to me that the example template doesn't reference the cluster defined in another template correctly. Could you please provide a working sample in which configuration of node pools can be updated in a separate ARM template (cluster with original node pools settings is defined and deployed in another template)?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,119 questions
{count} votes