generated from libre-devops/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
127 lines (114 loc) · 5.21 KB
/
main.tf
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
resource "azurerm_monitor_action_group" "this" {
for_each = { for group in var.action_groups : group.name => group }
name = each.value.name
resource_group_name = each.value.resource_group_name
short_name = each.value.short_name != null ? each.value.short_name : "agazuremonitor"
tags = each.value.tags
dynamic "arm_role_receiver" {
for_each = each.value.arm_role_receiver != null ? each.value.arm_role_receiver : []
content {
name = arm_role_receiver.value.name
role_id = arm_role_receiver.value.role_id
use_common_alert_schema = arm_role_receiver.value.use_common_alert_schema
}
}
dynamic "automation_runbook_receiver" {
for_each = each.value.automation_runbook_receiver != null ? each.value.automation_runbook_receiver : []
content {
name = automation_runbook_receiver.value.name
automation_account_id = automation_runbook_receiver.value.automation_account_id
runbook_name = automation_runbook_receiver.value.runbook_name
webhook_resource_id = automation_runbook_receiver.value.webhook_resource_id
is_global_runbook = automation_runbook_receiver.value.is_global_runbook
service_uri = automation_runbook_receiver.value.service_uri
use_common_alert_schema = automation_runbook_receiver.value.use_common_alert_schema
}
}
dynamic "azure_app_push_receiver" {
for_each = each.value.azure_app_push_receiver != null ? each.value.azure_app_push_receiver : []
content {
name = azure_app_push_receiver.value.name
email_address = azure_app_push_receiver.value.email_address
}
}
dynamic "azure_function_receiver" {
for_each = each.value.azure_function_receiver != null ? each.value.azure_function_receiver : []
content {
name = azure_function_receiver.value.name
function_app_resource_id = azure_function_receiver.value.function_app_resource_id
function_name = azure_function_receiver.value.function_name
http_trigger_url = azure_function_receiver.value.http_trigger_url
use_common_alert_schema = azure_function_receiver.value.use_common_alert_schema
}
}
dynamic "email_receiver" {
for_each = each.value.email_receiver != null ? each.value.email_receiver : []
content {
name = email_receiver.value.name
email_address = email_receiver.value.email_address
use_common_alert_schema = email_receiver.value.use_common_alert_schema
}
}
dynamic "event_hub_receiver" {
for_each = each.value.event_hub_receiver != null ? each.value.event_hub_receiver : []
content {
name = event_hub_receiver.value.name
event_hub_name = event_hub_receiver.value.event_hub_name
event_hub_namespace = event_hub_receiver.value.event_hub_namespace
subscription_id = event_hub_receiver.value.subscription_id
tenant_id = event_hub_receiver.value.tenant_id
use_common_alert_schema = event_hub_receiver.value.use_common_alert_schema
}
}
dynamic "itsm_receiver" {
for_each = each.value.itsm_receiver != null ? each.value.itsm_receiver : []
content {
name = itsm_receiver.value.name
workspace_id = itsm_receiver.value.workspace_id
connection_id = itsm_receiver.value.connection_id
ticket_configuration = itsm_receiver.value.ticket_configuration
region = itsm_receiver.value.region
}
}
dynamic "logic_app_receiver" {
for_each = each.value.logic_app_receiver != null ? each.value.logic_app_receiver : []
content {
name = logic_app_receiver.value.name
resource_id = logic_app_receiver.value.resource_id
callback_url = logic_app_receiver.value.callback_url
use_common_alert_schema = logic_app_receiver.value.use_common_alert_schema
}
}
dynamic "sms_receiver" {
for_each = each.value.sms_receiver != null ? each.value.sms_receiver : []
content {
name = sms_receiver.value.name
country_code = sms_receiver.value.country_code
phone_number = sms_receiver.value.phone_number
}
}
dynamic "voice_receiver" {
for_each = each.value.voice_receiver != null ? each.value.voice_receiver : []
content {
name = voice_receiver.value.name
country_code = voice_receiver.value.country_code
phone_number = voice_receiver.value.phone_number
}
}
dynamic "webhook_receiver" {
for_each = each.value.webhook_receiver != null ? each.value.webhook_receiver : []
content {
name = webhook_receiver.value.name
service_uri = webhook_receiver.value.service_uri
use_common_alert_schema = webhook_receiver.value.use_common_alert_schema
dynamic "aad_auth" {
for_each = webhook_receiver.value.aad_auth != null ? [webhook_receiver.value.aad_auth] : []
content {
object_id = aad_auth.value.object_id
identifier_uri = aad_auth.value.identifier_uri
tenant_id = aad_auth.value.tenant_id
}
}
}
}
}