feat: grafana IRM escalation module
новый модуль modules/grafana_irm_escalation, dev/adibrov подключён. секреты (oncall_access_token, user id) хранятся в Vault, в git не попадают
This commit is contained in:
21
environments/modules/grafana_irm_escalation/main.tf
Normal file
21
environments/modules/grafana_irm_escalation/main.tf
Normal file
@ -0,0 +1,21 @@
|
||||
resource "grafana_oncall_escalation_chain" "this" {
|
||||
name = var.name
|
||||
team_id = var.team_id
|
||||
}
|
||||
|
||||
resource "grafana_oncall_escalation" "steps" {
|
||||
# ключ = строковый индекс; порядок шагов фиксирован через position
|
||||
for_each = { for idx, step in var.steps : tostring(idx) => step }
|
||||
|
||||
escalation_chain_id = grafana_oncall_escalation_chain.this.id
|
||||
type = each.value.type
|
||||
position = tonumber(each.key)
|
||||
duration = each.value.duration_seconds
|
||||
persons_to_notify = each.value.persons_to_notify
|
||||
persons_to_notify_next_each_time = each.value.persons_to_notify_next_each_time
|
||||
notify_on_call_from_schedule = each.value.notify_on_call_from_schedule
|
||||
group_to_notify = each.value.group_to_notify
|
||||
action_to_trigger = each.value.action_to_trigger
|
||||
notify_to_team_members = each.value.notify_to_team_members
|
||||
important = each.value.important
|
||||
}
|
||||
Reference in New Issue
Block a user