0

I tried looking everywhere, but what is the list of available public settings for the Azure VirtualMachine Extensions as described in here?

What I'd like to achieve is to target single nodes in my ARM template, from this question it seems that I can specify the property "nodeName" but I would like to have a written technical documentation on different values.

For the sake of an example, this is a snippet of my template:

{
        "type": "Microsoft.Compute/virtualMachines/extensions",
        "name": "[concat(parameters('virtualMachineName'),'/', parameters('extensionName'))]",
        "apiVersion": "2015-06-15",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
        ],
        "properties": {
            "publisher": "Microsoft.Compute",
            "type": "CustomScriptExtension",
            "typeHandlerVersion": "1.9",
            "autoUpgradeMinorVersion": true,
            "settings": {
                "fileUris": "[split(concat(parameters('containerUri'), parameters('scriptToExecute')),' ')]",
                "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ',parameters('scriptToExecute'))]",
                "nodeName": "parameters('virtualMachineName')"
            },
            "protectedSettings": {
                "storageAccountName": "[parameters('customScriptStorageAccountName')]",
                "storageAccountKey": "[parameters('customScriptStorageAccountKey')]"
            }
        }
}

Thanks

Massimo
  • 692
  • 2
  • 11
  • 29

1 Answers1

1

There is no single place to view those for all extension, but for single extension there are places where they are described, not for all of those.

But to do what you are trying to achieve is easy. The name property of the extension specifies to which VM are you applying the extension:

"name": "[concat('vm1','/', parameters('extensionName'))]",

this will target Virtual Machine called vm1 (deployment and VM have to be in the same RG). and this will target Virtual Machine called vm2:

"name": "[concat('vm2','/', parameters('extensionName'))]",

ps. there is no nodename property.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • Ouch, that is cool, so if I want to apply the same Extension to multiple virtual machines, I have to duplicate the code? Seems weird! (Or not, I've found this: https://github.com/mspnp/template-building-blocks/wiki/VM-Extensions-(v1) ) Can you point me to where these places are? I'm ashamed to say that I can't find any! – Massimo Apr 05 '18 at 07:59
  • well, i cant, because for each individual extension it may or may not document a scheme somewhere. usually microsoft documents extensions somewhere on doc.microsoft.com (but it depends on the extension). if you want to target several vms - create a [loop](https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple#resource-iteration). also start away from that template-building-blocks. its way too complicated (at least until you feel confident about you arm template skills) – 4c74356b41 Apr 05 '18 at 08:12
  • Did you mean "stay away", right? Thanks for your help, really appreciated! :) – Massimo Apr 05 '18 at 08:20
  • oh sorry, yeah, `stay away`. its really overly complicated. you can go for it, as it is somewhat flexible, but I've warned you ;) – 4c74356b41 Apr 05 '18 at 08:29