Templates/VMSSExtension.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "vmssExtensionName": { "type": "string", "defaultValue": "mvssx%UID%", "metadata": { "description": "Name of the VMSS Extension" } }, "vmssExtensionLocation": { "type": "string", "defaultValue": "%LOCATION%", "metadata": { "description": "VMSS Extension Location." } }, "vmssName": { "type": "string", "defaultValue": "", "metadata": { "description": "Name of the Virtual Machine Scale Set" } }, "vmssExtensionFileUris": { "type": "array", "defaultValue": [], "metadata": { "description": "An Array or URIs to scripts that will be used." } }, "vmssExtensionCommandToExecute": { "type": "string", "defaultValue": "", "metadata": { "description": "The command to execute." } }, "vmssExtensionPublisher": { "type": "string", "defaultValue": "Microsoft.Azure.Extensions" }, "vmssExtensionType": { "type": "string", "defaultValue": "CustomScript" }, "vmssExtensionTypeHandlerVersion": { "type": "string", "defaultValue": "2.0" }, "vmssExtensionTags": { "type": "object", "defaultValue": { "Date": "%DATE%" }, "metadata": { "description": "VMSS Extension Tags." } } }, "variables": { "vmssExtensionLocation": "[if(empty(parameters('vmssExtensionLocation')), resourceGroup().location, parameters('vmssExtensionLocation'))]" }, "resources": [ { "name": "[concat(parameters('vmssName'),'/', parameters('vmssExtensionName'))]", "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", "apiVersion": "2017-12-01", "location": "[variables('vmssExtensionLocation')]", "tags": "[parameters('vmssExtensionTags')]", "properties": { "publisher": "[parameters('vmssExtensionPublisher')]", "type": "[parameters('vmssExtensionType')]", "typeHandlerVersion": "[parameters('vmssExtensionTypeHandlerVersion')]", "autoUpgradeMinorVersion": true, "settings": { "fileUris": "[parameters('vmssExtensionFileUris')]" }, "protectedSettings": { "commandToExecute": "[parameters('vmssExtensionCommandToExecute')]" } } } ], "outputs": {} } |