<@U03LQMDSGPL> is that in this resource? <https://...
# azure
b
c
Correct!
b
because azure-native is generated from the upstream Azure API, you can usually find what you need by searching the ARM API: https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux
Copy code
{
  "apiVersion": "2018-06-01",
  "type": "Microsoft.Compute/virtualMachines/extensions",
  "name": "virtualMachineName/config-app",
  "location": "[resourceGroup().location]",
  "dependsOn": [
    "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'),copyindex())]",
    "[variables('musicstoresqlName')]"
  ],
  "tags": {
    "displayName": "config-app"
  },
  "properties": {
    "publisher": "Microsoft.Compute",
    "type": "CustomScriptExtension",
    "typeHandlerVersion": "1.10",
    "autoUpgradeMinorVersion": true,
    "settings": {
      "timestamp": 123456789
    },
    "protectedSettings": {
      "commandToExecute": "myExecutionCommand",
      "storageAccountName": "myStorageAccountName",
      "storageAccountKey": "myStorageAccountKey",
      "managedIdentity": {},
      "fileUris": [
        "script location"
      ]
    }
  }
}
so in your case (assuming its windows) you'd set
protectedSettings: { commandToExecute }
or
protectedSettings: { fileUris }
c
I am actually trying to build a custom script for a Linux VM. I thought maybe there was a way to have the script file referenced on one of the fields, but if that's not the case then should I just replace
settings
with: `protectedSettings:
{ commands to execute
`}``?
b
@curved-eye-56312 that's:
protectedSettings: script <base64script
c
Thank you! I will take a closer look! 😀