-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactiongroup.tf
88 lines (74 loc) · 2.4 KB
/
actiongroup.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
resource "azurerm_resource_group" "cust_rg_name" {
name = local.rg_name
location = local.location
tags = local.default_tags
}
# data "azurerm_resource_group" "example" {
# name = local.rg_name
# }
resource "azurerm_monitor_action_group" "cust_acg" {
name = "acg-${local.management_sub_name}"
resource_group_name = azurerm_resource_group.cust_rg_name.name
short_name = "acg-${local.management_sub_short_name}"
webhook_receiver {
name = "Tietoevry Managed Cloud ServiceNow"
service_uri = "https://Event_Management_Azure:[email protected]/api/global/em/inbound_event?source=AzureCommonAlertSchema"
use_common_alert_schema = true
}
email_receiver {
name = "lt-costbudgetalert"
email_address = "[email protected]"
use_common_alert_schema = true
}
email_receiver {
name = "lt-costbudgetalert-alert"
email_address = "[email protected]"
use_common_alert_schema = true
}
email_receiver {
name = "lt-costbudgetalert-te"
email_address = "[email protected]"
use_common_alert_schema = true
}
depends_on = [ azurerm_resource_group.cust_rg_name ]
tags = local.default_tags
}
# resource "azurerm_consumption_budget_subscription" "cust_acbsub" {
# name = "acbrg_${local.management_sub_name}"
# subscription_id = data.azurerm_subscription.current.id
# amount = 2000
# time_grain = "Monthly"
# time_period {
# start_date = "2023-06-01T00:00:00Z"
# end_date = "2024-06-01T00:00:00Z"
# }
# notification {
# enabled = true
# threshold = 90.0
# operator = "EqualTo"
# threshold_type = "Forecasted"
# contact_emails = [
# ]
# contact_groups = [
# azurerm_monitor_action_group.cust_acg.id,
# ]
# contact_roles = [
# "Owner",
# ]
# }
# notification {
# enabled = true
# threshold = 100.0
# operator = "GreaterThan"
# threshold_type = "Actual"
# contact_emails = [
# ]
# contact_groups = [
# azurerm_monitor_action_group.cust_acg.id,
# ]
# }
# depends_on = [ azurerm_resource_group.cust_rg_name ]
# }
data "azurerm_subscription" "current" {}