I'm trying to deploy a modified version of https://github.com/Azure/azure-quickstart-templates/blob/master/201-vmss-ubuntu-autoscale/azuredeploy.json to add in the Docker extension but am getting an error when trying to deploy. You can see how I've tried to do this at https://gist.github.com/jinky32/d80e0ab2137236ff262484193f93c946 line 329++
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmName'),'/', variables('extensionName'))]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "DockerExtension",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true
}
}
when I run azure group create --name autoscalegroup2 --location "West Europe" \
--template-uri http://path/to.json
after entering a few of the details I am prompted for I get
error: InvalidTemplate : Deployment template validation failed: 'The resource 'Microsoft.Compute/virtualMachines/autoscalegroup2' is not defined in the template. Please see https://aka.ms/arm-template for usage details.'.
However I thought this should work based on lines 334-336
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
],
and vmName being defined in the variables above (line 68)
"vmName": "[resourceGroup().name]",
Any help very much appreciated!