-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaworkspace.bicep
62 lines (55 loc) · 1.51 KB
/
laworkspace.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//This bicep deploys Log Analytics Workspace.
//Scope
targetScope = 'resourceGroup'
//Parameters
param location string
param environmentid string
param umirid string
//Resources
//This deploys the Log Analytics Workspace.
resource laworkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: 'log-ADXFlowmaster-${environmentid}'
location: location
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${umirid}': {}
}
}
properties: {
features: {
disableLocalAuth: true
enableDataExport: true
}
publicNetworkAccessForIngestion: 'Disabled'
publicNetworkAccessForQuery: 'Enabled'
retentionInDays: 90
sku: {
name: 'PerGB2018'
}
}
}
//This deploys the Azure Monitor Private Link Scope.
resource amplsscope 'microsoft.insights/privateLinkScopes@2021-07-01-preview' = {
name: 'ampls-ADXFlowmaster-${environmentid}'
location: 'global'
properties: {
accessModeSettings: {
ingestionAccessMode: 'PrivateOnly'
queryAccessMode: 'Open'
}
}
}
//This deploys the Azure Monitor Private Link Scope Link.
resource amplslink 'Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview' = {
name: 'amplslink-ADXFlowmaster-${environmentid}'
parent: amplsscope
properties: {
linkedResourceId: laworkspace.id
}
}
//Outputs
output laworkspacerid string = laworkspace.id
output laworkspacename string = laworkspace.name
output amplsscopeid string = amplsscope.id
output amplsscopename string = amplsscope.name