Skip to content

Instantly share code, notes, and snippets.

@krnese
Created February 16, 2017 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krnese/182664e188d1a6342eef285bd1712dce to your computer and use it in GitHub Desktop.
Save krnese/182664e188d1a6342eef285bd1712dce to your computer and use it in GitHub Desktop.
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Compute/virtualMachines/extensions",
"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('managementType').type]",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"workspaceId": "[reference(resourceId(parameters('workspaceResourceGroupName'), 'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-11-01-preview').customerId]",
"azureResourceId": "[resourceId('Microsoft.Compute/virtualMachines/', concat(parameters('vmNameSuffix'), 'VM', copyIndex()))]"
},
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId(parameters('workspaceResourceGroupName'),'Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-11-01-preview').primarySharedKey]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment