-
Notifications
You must be signed in to change notification settings - Fork 19
/
monitoring-variables.tf
155 lines (134 loc) · 5.59 KB
/
monitoring-variables.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# -----------------------------------------------------------------------------
# Topics Variables
# -----------------------------------------------------------------------------
variable "security_topic_name" {
type = string
description = "The name of security topic"
default = "Security-Topic"
}
variable "network_topic_name" {
type = string
description = "The name of network topic"
default = "Network-Topic"
}
variable "budget_topic_name" {
type = string
description = "The name of budget topic"
default = "Budget-Topic"
}
# -----------------------------------------------------------------------------
# Subscription Variables
# -----------------------------------------------------------------------------
variable "subscription_protocol" {
type = string
description = "The protocol used for the subscription"
default = "EMAIL"
}
variable "security_admin_email_endpoints" {
type = list(string)
default = []
description = "List of email addresses for all security related notifications."
validation {
condition = length([for e in var.security_admin_email_endpoints : e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]) == length(var.security_admin_email_endpoints)
error_message = "Validation failed security_admin_email_endpoints: invalid email address."
}
}
variable "budget_admin_email_endpoints" {
type = list(string)
default = []
description = "List of email addresses for all budget related notifications."
validation {
condition = length([for e in var.budget_admin_email_endpoints : e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]) == length(var.budget_admin_email_endpoints)
error_message = "Validation failed budget_admin_email_endpoints: invalid email address."
}
}
variable "network_admin_email_endpoints" {
type = list(string)
default = []
description = "List of email addresses for all network related notifications."
validation {
condition = length([for e in var.network_admin_email_endpoints : e if length(regexall("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", e)) > 0]) == length(var.network_admin_email_endpoints)
error_message = "Validation failed network_admin_email_endpoints: invalid email address."
}
}
# -----------------------------------------------------------------------------
# Notification Rules Variables
# -----------------------------------------------------------------------------
variable "notification_action_type" {
type = string
description = "The action to perform if the condition in the rule matches an event. Available options: ONS, OSS, FAAS"
default = "ONS"
}
variable "notification_action_description" {
type = string
description = "The details of the action"
default = "Sends notification via ONS"
}
variable "enable_iam_notification_action" {
type = bool
description = "Whether or not the iam notification action is currently enabled"
default = true
}
variable "iam_notification_display_name" {
type = string
description = "the display name of iam notification rule"
default = "Iam-Change-Notification"
}
variable "network_notification_display_name" {
type = string
description = "the display name of network notification rule"
default = "Network-Change-Notification"
}
variable "enable_network_notification_action" {
type = bool
description = "Whether or not the network notification action is currently enabled"
default = true
}
variable "enable_iam_notification_rule" {
type = bool
description = "Whether or not the iam rule is currently enabled"
default = true
}
variable "iam_notification_description" {
type = string
description = "Details of the iam notification rule"
default = "Events rule to detect when IAM resources are created, updated or deleted"
}
variable "enable_network_notification_rule" {
type = bool
description = "Whether or not the network rule is currently enabled"
default = true
}
variable "network_notification_description" {
type = string
description = "Details of the network notification rule"
default = "Events rule to detect when network resources are created, updated or deleted"
}
variable "enable_budget_notification_action" {
type = bool
description = "Whether or not the budget notification action is currently enabled"
default = true
}
variable "budget_notification_display_name" {
type = string
description = "the display name of budget notification rule"
default = "Budget-Change-Notification"
}
variable "enable_budget_notification_rule" {
type = bool
description = "Whether or not the budget rule is currently enabled"
default = true
}
variable "budget_notification_description" {
type = string
description = "Details of the budget notification rule"
default = "Events rule to detect when budget resources are created, updated or deleted"
}
# -----------------------------------------------------------------------------
# Alarms Variables
# -----------------------------------------------------------------------------
variable "enable_alarms" {
type = bool
default = true
description = "Enable alarm service when set to true, disable it when set to false"
}