Share via

Missing required property "protectedSettings" when writing ARM Template for "Microsoft.Compute/virtualMachines/extensions"

Baeuerle, Joerg 1 Reputation point
2021-10-12T13:04:29.76+00:00

I am using Visual Studio Code with the ARM Tools extension.

When I write an ARM template for the resource type Microsoft.Compute/virtualMachines/extensions, I get an intellisense error Missing required property "protectedSettings". Why is that? I do not want to use any protected settings. Also, if I just add empty protected settings like "protectedSettings": { }, I get even more errors.

What's wrong here? Why are protectedSettings mandatory in the schema?

Code snippet:

    {
      "type": "Microsoft.Compute/virtualMachines/extensions",
      "name": "[concat(variables('vmName'),'/setupdnsfirewall')]",
      "apiVersion": "2021-03-01",
      "location": "Germany West Central",
      "dependsOn": [
        "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
      ],
      "properties": {
        "publisher": "Microsoft.Azure.Extensions",
        "type": "CustomScript",
        "typeHandlerVersion": "2.0",
        "autoUpgradeMinorVersion": true,
        "settings": {
          "fileUris": [
            "[variables('scriptUrl')]"
          ],
          "commandToExecute": "sh myscript.sh"
        }
      }
    }
Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Most helpful
  1. Baeuerle, Joerg 1 Reputation point
    2021-10-13T06:46:43.313+00:00

    Just as a side node: Despite the intellisense errors, I can deploy the template without any problems.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.