resource "grafana_oncall_integration" "test-acc-integration" {
provider = grafana.oncall
name = "my integration"
type = "grafana"
default_route {
}
}
# Also it's possible to manage integration templates.
# Check docs to see all available templates.
resource "grafana_oncall_integration" "integration_with_templates" {
provider = grafana.oncall
name = "integration_with_templates"
type = "webhook"
default_route {
}
templates {
grouping_key = "{{ payload.group_id }}"
slack {
title = "Slack title"
message = <<-EOT
This is example of multiline template
{{ payload.message }}
EOT
image_url = "{{ payload.image_url }}"
}
}
}
default_route
(Block List, Min: 1, Max: 1) The Default route for all alerts from the given integration (see below for nested schema)name
(String) The name of the service integration.type
(String) The type of integration. Can be grafana, grafana_alerting, webhook, alertmanager, kapacitor, fabric, newrelic, datadog, pagerduty, pingdom, elastalert, amazon_sns, curler, sentry, formatted_webhook, heartbeat, demo, manual, stackdriver, uptimerobot, sentry_platform, zabbix, prtg, slack_channel, inbound_email, direct_paging, jira.team_id
(String) The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the grafana_oncall_team
datasource.templates
(Block List, Max: 1) Jinja2 templates for Alert payload. An empty templates block will be ignored. (see below for nested schema)id
(String) The ID of this resource.link
(String) The link for using in an integrated tool.default_route
Optional:
escalation_chain_id
(String) The ID of the escalation chain.msteams
(Block List, Max: 1) MS teams-specific settings for a route. (see below for nested schema)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)Read-Only:
id
(String)default_route.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.default_route.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
.default_route.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.templates
Optional:
acknowledge_signal
(String) Template for sending a signal to acknowledge the Incident.email
(Block List, Max: 1) Templates for Email. (see below for nested schema)grouping_key
(String) Template for the key by which alerts are grouped.microsoft_teams
(Block List, Max: 1) Templates for Microsoft Teams. (see below for nested schema)phone_call
(Block List, Max: 1) Templates for Phone Call. (see below for nested schema)resolve_signal
(String) Template for sending a signal to resolve the Incident.slack
(Block List, Max: 1) Templates for Slack. (see below for nested schema)sms
(Block List, Max: 1) Templates for SMS. (see below for nested schema)source_link
(String) Template for a source link.telegram
(Block List, Max: 1) Templates for Telegram. (see below for nested schema)web
(Block List, Max: 1) Templates for Web. (see below for nested schema)templates.email
Optional:
message
(String) Template for Alert message.title
(String) Template for Alert title.templates.microsoft_teams
Optional:
image_url
(String) Template for Alert image url.message
(String) Template for Alert message.title
(String) Template for Alert title.templates.phone_call
Optional:
title
(String) Template for Alert title.templates.slack
Optional:
image_url
(String) Template for Alert image url.message
(String) Template for Alert message.title
(String) Template for Alert title.templates.sms
Optional:
title
(String) Template for Alert title.templates.telegram
Optional:
image_url
(String) Template for Alert image url.message
(String) Template for Alert message.title
(String) Template for Alert title.templates.web
Optional:
image_url
(String) Template for Alert image url.message
(String) Template for Alert message.title
(String) Template for Alert title.Import is supported using the following syntax:
terraform import grafana_oncall_integration.name "{{ id }}"