-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathlogAnalytics.bicep
39 lines (33 loc) · 1.03 KB
/
logAnalytics.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
// Parameters
@description('Specifies the name of the Log Analytics workspace.')
param name string
@description('Specifies the service tier of the workspace: Free, Standalone, PerNode, Per-GB.')
@allowed([
'Free'
'Standalone'
'PerNode'
'PerGB2018'
])
param sku string = 'PerNode'
@description('Specifies the workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus.')
param retentionInDays int = 60
@description('Specifies the location.')
param location string = resourceGroup().location
@description('Specifies the resource tags.')
param tags object
// Resources
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: name
tags: tags
location: location
properties: {
sku: {
name: sku
}
retentionInDays: retentionInDays
}
}
//Outputs
output id string = logAnalyticsWorkspace.id
output name string = logAnalyticsWorkspace.name
output customerId string = logAnalyticsWorkspace.properties.customerId