Skip to content

Instantly share code, notes, and snippets.

@krnese
Created May 21, 2017 04:49
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/85a2e50a3f7edcaab9c1d45b33474312 to your computer and use it in GitHub Desktop.
Save krnese/85a2e50a3f7edcaab9c1d45b33474312 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"omsAutomationAccountName": {
"type": "string",
"metadata": {
"description": "Specify the name of the automation account you will create"
}
},
"omsAutomationRegion": {
"type": "string",
"defaultValue": "westeurope",
"metadata": {
"description": "Specify the region where you want to deploy your automation account"
}
},
"enableMonitor": {
"type": "string",
"allowedValues": [
"Yes",
"No"
],
"defaultValue": "Yes"
}
},
"variables": {
"omsRg": "AzureScaleMgmt",
"omsWorkspace": "AzureScaleWorkspace"
},
"resources": [
{
"condition": "[equals(parameters('enableMonitor'), 'No')]",
"type": "Microsoft.Automation/automationAccounts",
"name": "[concat(parameters('omsAutomationAccountName'), 'no')]",
"location": "[parameters('omsAutomationRegion')]",
"apiVersion": "2015-10-31",
"properties": {
"sku": {
"name": "Free"
}
}
},
{
"condition": "[equals(parameters('enableMonitor'), 'Yes')]",
"type": "Microsoft.Automation/automationAccounts",
"name": "[concat(parameters('omsAutomationAccountName'), 'yes')]",
"location": "[parameters('omsAutomationRegion')]",
"apiVersion": "2015-10-31",
"properties": {
"sku": {
"name": "Free"
}
},
"resources": [
{
"condition": "[equals(parameters('enableMonitor'), 'Yes')]",
"type": "providers/diagnosticSettings",
"name": "Microsoft.Insights/service",
"apiVersion": "2015-07-01",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('omsAutomationAccountName'), 'yes')]"
],
"properties": {
"workspaceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', variables('omsRg'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspace'))]",
"logs": [
{
"category": "JobLogs",
"enabled": true
},
{
"category": "JobStreams",
"enabled": true
}
]
}
}
]
}
],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment