2026-03-25 06:41:19 +03:00
|
|
|
variable "contact_points" {
|
|
|
|
|
description = "List of contact points"
|
|
|
|
|
type = list(object({
|
2026-03-25 07:31:02 +03:00
|
|
|
name = string
|
|
|
|
|
type = string
|
|
|
|
|
is_default = optional(bool, false)
|
|
|
|
|
labels = optional(map(string))
|
|
|
|
|
settings = map(string)
|
2026-03-25 06:41:19 +03:00
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "org_id" {
|
|
|
|
|
description = "Grafana organization ID"
|
|
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "disable_provenance" {
|
|
|
|
|
description = "Controls whether Grafana provisioning is disabled"
|
|
|
|
|
type = bool
|
|
|
|
|
default = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "group_by" {
|
|
|
|
|
description = "A list of alert labels to group alerts into notifications"
|
|
|
|
|
type = list(string)
|
|
|
|
|
default = ["alertname"]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "group_wait" {
|
|
|
|
|
description = "Time to wait to buffer alerts of the same group before sending a notification"
|
|
|
|
|
type = string
|
|
|
|
|
default = "30s"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "group_interval" {
|
|
|
|
|
description = "Minimum time interval between two notifications for the same group"
|
|
|
|
|
type = string
|
|
|
|
|
default = "5m"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "repeat_interval" {
|
|
|
|
|
description = "Minimum time interval for re-sending a notification if an alert is still firing"
|
|
|
|
|
type = string
|
|
|
|
|
default = "4h"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "notification_policies" {
|
|
|
|
|
description = "Routing rules for specific label sets"
|
2026-03-25 07:31:02 +03:00
|
|
|
type = list(object({
|
2026-03-25 06:41:19 +03:00
|
|
|
contact_point = string
|
|
|
|
|
continue = optional(bool)
|
|
|
|
|
group_by = optional(list(string))
|
|
|
|
|
group_wait = optional(string)
|
|
|
|
|
group_interval = optional(string)
|
|
|
|
|
repeat_interval = optional(string)
|
2026-03-25 07:31:02 +03:00
|
|
|
matchers = list(object({
|
2026-03-25 06:41:19 +03:00
|
|
|
label = string
|
|
|
|
|
match = string # Allowed operators are = for equality, != for negated equality, =~ for regex equality, and !~ for negated regex equality
|
|
|
|
|
value = string
|
|
|
|
|
}))
|
2026-03-25 07:31:02 +03:00
|
|
|
policies = optional(list(object({
|
2026-03-25 06:41:19 +03:00
|
|
|
contact_point = string
|
|
|
|
|
continue = optional(bool)
|
|
|
|
|
group_by = optional(list(string))
|
|
|
|
|
group_wait = optional(string)
|
|
|
|
|
group_interval = optional(string)
|
|
|
|
|
repeat_interval = optional(string)
|
2026-03-25 07:31:02 +03:00
|
|
|
matchers = list(object({
|
2026-03-25 06:41:19 +03:00
|
|
|
label = string
|
|
|
|
|
match = string
|
|
|
|
|
value = string
|
|
|
|
|
}))
|
|
|
|
|
})), [])
|
|
|
|
|
}))
|
2026-03-25 07:31:02 +03:00
|
|
|
default = []
|
2026-03-25 06:41:19 +03:00
|
|
|
}
|