Created
May 21, 2017 04:49
-
-
Save krnese/85a2e50a3f7edcaab9c1d45b33474312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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