-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazuredeploy.org-ops.bicep
79 lines (72 loc) · 2.65 KB
/
azuredeploy.org-ops.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@description('The prefix will be used for every parameter that represents a resource name')
param resourceNamePrefix string = 'customer-project'
@description('The suffix will be appended to every parameter that represents a resource name')
param resourceNameSuffix string
param alertNotificationFallbackEmail string = ''
var actionGrpOpsIndicationsName = '${resourceNamePrefix}-indications-ag-${resourceNameSuffix}'
var actionGrpOpsIndicationsShortName = 'OpsIndic'
var actionGrpOpsIssuesName = '${resourceNamePrefix}-issues-ag-${resourceNameSuffix}'
var actionGrpOpsIssuesShortName = 'OpsIssues'
resource actionGrpOpsIndicationsRes 'Microsoft.Insights/actionGroups@2022-06-01' = {
name: actionGrpOpsIndicationsName
location: 'Global'
properties: {
groupShortName: actionGrpOpsIndicationsShortName // Caution: maximal 12 characters
enabled: true
emailReceivers: !empty(alertNotificationFallbackEmail) ? [
{
name: 'Fallback'
emailAddress: alertNotificationFallbackEmail
useCommonAlertSchema: true
}
] : []
smsReceivers: []
webhookReceivers: []
azureAppPushReceivers: []
logicAppReceivers: []
azureFunctionReceivers: []
armRoleReceivers: [
// Overview of built-in roles with its IDs: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
{
name: 'Monitoring Contributor'
roleId: '749f88d5-cbae-40b8-bcfc-e573ddc772fa'
useCommonAlertSchema: true
}
]
}
}
resource actionGrpOpsIssuesRes 'Microsoft.Insights/actionGroups@2022-06-01' = {
name: actionGrpOpsIssuesName
location: 'Global'
properties: {
groupShortName: actionGrpOpsIssuesShortName // Caution: maximal 12 characters
enabled: true
emailReceivers: !empty(alertNotificationFallbackEmail) ? [
{
name: 'Fallback'
emailAddress: alertNotificationFallbackEmail
useCommonAlertSchema: true
}
] : []
smsReceivers: []
webhookReceivers: []
azureAppPushReceivers: []
logicAppReceivers: []
azureFunctionReceivers: []
armRoleReceivers: [
// Overview of built-in roles with its IDs: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
{
name: 'Monitoring Contributor'
roleId: '749f88d5-cbae-40b8-bcfc-e573ddc772fa'
useCommonAlertSchema: true
}
{
name: 'Monitoring Reader'
roleId: '43d0d8ad-25c7-4714-9337-8ba259a9fe05'
useCommonAlertSchema: true
}
]
}
}
output actionGrpOrgOpsIndicationsResId string = actionGrpOpsIndicationsRes.id
output actionGrpOrgOpsIssuesResId string = actionGrpOpsIssuesRes.id