-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathvariables.tf
More file actions
204 lines (173 loc) · 5.3 KB
/
Copy pathvariables.tf
File metadata and controls
204 lines (173 loc) · 5.3 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
variable "project_id" {
type = string
}
variable "notification_channels" {
description = "List of notification channels to alert."
type = list(string)
default = []
}
variable "notification_channels_pager" {
description = "Incident.io notification channel."
type = list(string)
default = []
}
variable "notification_channels_slack" {
description = "Slack notification channel."
type = list(string)
default = []
}
variable "notification_channels_email" {
description = "Email notification channel."
type = list(string)
default = []
}
variable "notification_channels_pubsub" {
description = "Pubsub notification channel."
type = list(string)
default = []
}
variable "oom_filter" {
description = "additional filter to apply to oom alert policy"
type = string
default = ""
}
variable "signal_filter" {
description = "additional filter to apply to signal alert policy"
type = string
default = ""
}
variable "failed_req_filter" {
description = "additional filter to apply to failed request alert policy"
type = string
default = ""
}
variable "scaling_issue_filter" {
description = "additional filter to apply to scaling issue alert policy"
type = string
default = ""
}
variable "exitcode_filter" {
description = "additional filter to apply to exitcode alert policy"
type = string
default = ""
}
variable "job_exitcode_filter" {
description = "additional filter to apply to job exitcode alert policy"
type = string
default = ""
}
variable "failure_rate_ratio_threshold" {
description = "ratio threshold to alert for cloud run server failure rate."
type = number
default = 0.2
}
variable "failure_rate_duration" {
description = "duration for condition to be active before alerting"
type = number
default = 120
}
variable "failure_rate_exclude_services" {
description = "List of service names to exclude from the 5xx failure rate alert"
type = list(string)
default = []
}
variable "grpc_failure_rate_exclude_services" {
description = "List of service names to exclude from non-grpc failure rate alert"
type = list(string)
default = []
}
variable "dlq_filter" {
description = "additional filter to apply to dlq alert policy"
type = string
default = ""
}
variable "dlq_alert_threshold" {
description = "Number of dead-letter queue messages above which the alert fires."
type = number
default = 1
}
variable "dlq_alert_duration" {
description = "How long the dead-letter queue message count must stay above the threshold before the alert fires (e.g. '0s', '600s')."
type = string
default = "0s"
}
variable "panic_filter" {
description = "additional filter to apply to panic alert policy"
type = string
default = ""
}
variable "timeout_filter" {
description = "additional filter to apply to timeout alert policy"
type = string
default = ""
}
variable "enable_scaling_alerts" {
description = <<EOT
Whether to enable scaling alerts.
When logs appear with
"The request was aborted because there was no available instance." or
"The request failed because either the HTTP response was malformed or connection to the instance had an error."
EOT
type = bool
default = false
}
variable "team" {
description = "Team label to apply to resources (replaces deprecated 'squad')."
type = string
}
variable "global_only_alerts" {
description = "only enable global alerts. when true, only create alerts that are global."
type = bool
default = false
}
variable "http_error_threshold" {
description = "threshold for http error."
type = number
default = 0.25
}
variable "http_error_exclude_services" {
description = "List of service names to exclude from the http error rate alert."
type = list(string)
default = []
}
variable "http_error_method_status_exclusions" {
description = "Map of service names to method/status exclusions. Each entry excludes the service from the main http error condition and generates replacement conditions that exclude the specified method+code combination(s). Set `code` for a single status code or `codes` for several; exactly one of the two must be set."
type = map(object({
method = string
code = optional(string)
codes = optional(list(string), [])
}))
default = {}
validation {
condition = alltrue([
for k, v in var.http_error_method_status_exclusions : (v.code != null) != (length(v.codes) > 0)
])
error_message = "Each exclusion must set exactly one of `code` or `codes`."
}
}
variable "grpc_error_threshold" {
description = "threshold for grpc error."
type = number
default = 0.25
}
variable "grpc_non_error_codes" {
description = "List of grpc codes to not counted as error, case-sensitive."
type = list(string)
default = [
"OK",
"Aborted",
"AlreadyExists",
"Canceled",
"NotFound",
]
}
variable "product" {
description = "Product label to apply to the service."
type = string
default = "unknown"
}
variable "enable_high_retry" {
description = "Whether to enable the workqueue high retry alert"
type = bool
default = false
}