data "grafana_oncall_slack_channel" "example_slack_channel" {
name = "example_slack_channel"
}
resource "grafana_oncall_escalation_chain" "default" {
name = "default"
}
resource "grafana_oncall_integration" "example_integration" {
name = "Grafana Integration"
type = "grafana"
default_route {
}
}
resource "grafana_oncall_route" "example_route" {
integration_id = grafana_oncall_integration.example_integration.id
escalation_chain_id = grafana_oncall_escalation_chain.default.id
routing_regex = "us-(east|west)"
position = 0
slack {
channel_id = data.grafana_oncall_slack_channel.example_slack_channel.slack_id
enabled = true
}
telegram {
id = "ONCALLTELEGRAMID"
enabled = true
}
msteams {
id = "ONCALLMSTEAMSID"
enabled = false
}
}
escalation_chain_id
(String) The ID of the escalation chain.integration_id
(String) The ID of the integration.position
(Number) The position of the route (starts from 0).routing_regex
(String) Python Regex query. Route is chosen for an alert if there is a match inside the alert payload.msteams
(Block List, Max: 1) MS teams-specific settings for a route. (see below for nested schema)routing_type
(String) The type of route. Can be jinja2, regex Defaults to regex
.slack
(Block List, Max: 1) Slack-specific settings for a route. (see below for nested schema)telegram
(Block List, Max: 1) Telegram-specific settings for a route. (see below for nested schema)id
(String) The ID of this resource.msteams
Optional:
enabled
(Boolean) Enable notification in MS teams. Defaults to true
.id
(String) MS teams channel id. Alerts will be directed to this channel in Microsoft teams.slack
Optional:
channel_id
(String) Slack channel id. Alerts will be directed to this channel in Slack.enabled
(Boolean) Enable notification in Slack. Defaults to true
.telegram
Optional:
enabled
(Boolean) Enable notification in Telegram. Defaults to true
.id
(String) Telegram channel id. Alerts will be directed to this channel in Telegram.Import is supported using the following syntax:
terraform import grafana_oncall_route.name "{{ id }}"