-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.bicep
43 lines (39 loc) · 1.04 KB
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
param sku string = 'pergb2018'
param dataRetention int = 30
param location string = resourceGroup().location
param appName string = uniqueString(resourceGroup().id)
var workspaceName = toLower('la-${appName}')
var automationaccountName = toLower('aa${appName}')
var automationaccountDiagName = toLower('diag-aa${appName}')
resource automation_log_analytics 'Microsoft.OperationalInsights/workspaces@2020-03-01-preview' = {
location: location
name: workspaceName
properties: {
sku: {
name: sku
}
retentionInDays: dataRetention
}
}
resource automation_account 'Microsoft.Automation/automationAccounts@2015-10-31' = {
location: location
name: automationaccountName
properties: {
sku: {
name: 'Basic'
}
}
}
resource automation_account_diagnostic 'microsoft.insights/diagnosticSettings@2017-05-01-preview' = {
name: automationaccountDiagName
scope: automation_account
properties: {
workspaceId: automation_log_analytics.id
logs: [
{
category: 'JobLogs'
enabled: true
}
]
}
}