{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { "clusterName": { "type": "string", "metadata": { "description": "The name of the Managed Cluster resource." } }, "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "The location of the Managed Cluster resource." } }, "agentPoolProfilesUpdate": { "type": "array", "metadata": { "description": "Configuration of node pools" } } }, "resources": [ { "copy": { "name": "agentpools", "mode": "serial", "batchSize":1, "count": "[length(parameters('agentPoolProfilesUpdate'))]" }, "apiVersion": "2021-02-01", "type": "Microsoft.ContainerService/managedClusters/agentPools", "name": "[concat(parameters('clusterName'),'/', parameters('agentPoolProfilesUpdate')[copyIndex('agentpools')].name)]", "location": "[parameters('location')]", "properties": "[parameters('agentPoolProfilesUpdate')[copyIndex('agentpools')]]" } ] }