Skip to content

Commit 667ba7b

Browse files
making fields optional
1 parent 11b59ba commit 667ba7b

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

monitoring.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ resource "datadog_monitor" "dead_letters_monitor" {
2222
query = "avg(last_1h):avg:aws.sqs.approximate_number_of_messages_visible{queuename:${each.key}} > ${var.dl_critical}"
2323

2424
monitor_thresholds {
25-
warning = local.dl_warning
26-
warning_recovery = local.dl_warning - 1
27-
critical = local.dl_critical
28-
critical_recovery = local.dl_critical - 1
25+
warning = local.dl_warning
26+
critical = local.dl_critical
27+
ok = local.dl_ok
2928
}
3029

3130
notify_no_data = false

variables.tf

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,21 @@ variable "dl_alert_message" {
256256
}
257257

258258
variable "dl_warning" {
259-
type = number
260-
default = 0
259+
type = any
260+
default = ""
261261
description = "Dead letters warning value"
262262
}
263263

264264
variable "dl_critical" {
265-
type = number
266-
default = 0
265+
type = any
266+
default = ""
267+
description = "Dead letters critical value"
268+
}
269+
variable "dl_ok" {
270+
type = any
271+
default = ""
267272
description = "Dead letters critical value"
268273
}
269-
270274
variable "tags_monitoring" {
271275
type = list(string)
272276
default = []

0 commit comments

Comments
 (0)