pagerduty_slack_connection

A slack connection allows you to connect a workspace in Slack to a PagerDuty service or team which allows you to acknowledge and resolve PagerDuty incidents from the Slack user interface.

NOTES for using this resource:

Example Usage

resource "pagerduty_team" "foo" {
  name = "Team Foo"
}

data "pagerduty_priority" "p1" {
  name = "P1"
}

resource "pagerduty_slack_connection" "foo" {
  source_id = pagerduty_team.foo.id
  source_type = "team_reference"
  workspace_id = "T02A123LV1A"
  channel_id = "C02CABCDAC9"
  notification_type = "responder"
  config {
    events = [
      "incident.triggered",
      "incident.acknowledged",
      "incident.escalated",
      "incident.resolved",
      "incident.reassigned",
      "incident.annotated",
      "incident.unacknowledged",
      "incident.delegated",
      "incident.priority_updated",
      "incident.responder.added",
      "incident.responder.replied",
      "incident.status_update_published",
      "incident.reopened"
    ]
    priorities = [data.pagerduty_priority.p1.id]

  }
}

Argument Reference

The following arguments are supported:

Connection Config (config) Supports the following:

Attributes Reference

The following attributes are exported:

Import

Slack connections can be imported using the related workspace ID and the slack_connection ID separated by a dot, e.g.

$ terraform import pagerduty_slack_connection.main T02A123LV1A.PUABCDL