Files
grafana-terraform/environments/modules/grafana_irm_escalation/main.tf
Alexandr 5d05640e80
All checks were successful
terraform-dev / validate (push) Successful in 7s
terraform-dev / plan (push) Successful in 7s
terraform-dev / apply (push) Has been skipped
feat: grafana IRM escalation module
новый модуль modules/grafana_irm_escalation, dev/adibrov подключён.
секреты (oncall_access_token, user id) хранятся в Vault, в git не попадают
2026-04-01 08:21:24 +03:00

22 lines
1.0 KiB
HCL

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
}