The correct way to use the puppet agent Extension for Windows VMs in Azure ARM template

The examples I found with google were all not working, including the official azure-quickstart templates from Azure. After few hours of testing (starting new VM takes time) I found the correct template by actually looking at a VM where the puppet extension was installed via the Azure Portal.

The part with the "placeholder" is of course strange and not needed: the actual settings need to go there, not the dummy stuff.
Also the puppet docs state that the master_server must be in caps.

So taking the azure-quickstart template:

Not like this

      "properties": {
        "publisher": "PuppetLabs",
        "type": "PuppetEnterpriseAgent",
        "typeHandlerVersion": "3.2",
        "settings": {
          "puppet_master_server": "[parameters('puppet_master_server_url')]"
        },
        "protectedSettings": {
          "placeHolder": {
            "placeHolder": "placeHolder"
          }
        }

but this works

    {
      "type": "Microsoft.Compute/virtualMachines/extensions",
      "name": "[concat(variables('vmName'),'/', variables('vmExtensionName'))]",
      "apiVersion": "2015-06-15",
      "location": "[resourceGroup().location]",
      "dependsOn": [
        "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
      ],
      "properties": {
        "publisher": "puppet",
        "type": "puppetAgent",
        "typeHandlerVersion": "1.5",
        "protectedSettings": {
          "PUPPET_MASTER_SERVER": "[parameters('puppet_master_server_url')]"
          }
        }
      }
    

I also changed to puppet iso the enterprise version of the agent.