Skip to content

Instantly share code, notes, and snippets.

@krnese
Created June 15, 2017 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save krnese/75f7b09cf9c38b37bd2f9ddae009ed01 to your computer and use it in GitHub Desktop.
Save krnese/75f7b09cf9c38b37bd2f9ddae009ed01 to your computer and use it in GitHub Desktop.
{
"condition": "[equals(parameters('platform'), 'Windows')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2016-03-30",
"name": "[concat(parameters('vmNameSuffix'), 'VM', copyIndex(), '/OMS')]",
"location": "[resourceGroup().location]",
"copy": {
"name": "[concat(parameters('vmNameSuffix'), 'VM', 'OMS')]",
"count": "[parameters('instanceCount')]"
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmNameSuffix'), 'VM', copyIndex())]"
],
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "[variables('managementTypeWindows').type]",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "[reference(resourceId(parameters('omsResourceGroup'), 'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').customerId]",
"azureResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmNameSuffix'), 'VM', copyIndex()))]"
},
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId(parameters('omsResourceGroup'),'Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')), '2015-11-01-preview').primarySharedKey]"
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment