File tree Expand file tree Collapse file tree 2 files changed +61
-0
lines changed
infrastructure/modules/infra Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ module "monitor_action_group" {
2+ for_each = local. monitor_action_group_map
3+
4+ source = " ../dtos-devops-templates/infrastructure/modules/monitor-action-group"
5+
6+ name = module. shared_config . names . monitor-action-group
7+ resource_group_name = azurerm_resource_group. main . name
8+ location = var. region
9+ short_name = each. value . short_name
10+ email_receiver = each. value . email_receiver
11+ event_hub_receiver = each. value . event_hub_receiver
12+ sms_receiver = each. value . sms_receiver
13+ voice_receiver = each. value . voice_receiver
14+ webhook_receiver = each. value . webhook_receiver
15+ }
16+
17+ locals {
18+ monitor_action_group_map = {
19+ for action_group_key , action_group_details in var . monitor_action_group :
20+ action_group_key = > merge (
21+ {
22+ action_group_key = action_group_key
23+ },
24+ action_group_details
25+ )
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -34,6 +34,40 @@ variable "protect_keyvault" {
3434 default = true
3535}
3636
37+ variable "monitor_action_group" {
38+ description = " Default configuration for the monitor action groups."
39+ type = map (object ({
40+ short_name = string
41+ email_receiver = optional (map (object ({
42+ name = string
43+ email_address = string
44+ use_common_alert_schema = optional (bool , false )
45+ })))
46+ event_hub_receiver = optional (map (object ({
47+ name = string
48+ event_hub_namespace = string
49+ event_hub_name = string
50+ subscription_id = string
51+ use_common_alert_schema = optional (bool , false )
52+ })))
53+ sms_receiver = optional (map (object ({
54+ name = string
55+ country_code = string
56+ phone_number = string
57+ })))
58+ voice_receiver = optional (map (object ({
59+ name = string
60+ country_code = string
61+ phone_number = string
62+ })))
63+ webhook_receiver = optional (map (object ({
64+ name = string
65+ service_uri = string
66+ use_common_alert_schema = optional (bool , false )
67+ })))
68+ }))
69+ }
70+
3771locals {
3872 hub_vnet_rg_name = " rg-hub-${ var . hub } -uks-hub-networking"
3973}
You can’t perform that action at this time.
0 commit comments