pagerduty_webhook_subscription

A webhook subscription allow you to receive HTTP callbacks when incidents are created, updated and deleted. These are also known as V3 Webhooks.

Example Usage

data "pagerduty_service" "example" {
  name = "My Service"
}

resource "pagerduty_webhook_subscription" "foo" {
  delivery_method {
    type = "http_delivery_method"
    url = "https://example.com/receive_a_pagerduty_webhook"
    custom_header {
        name = "X-Foo"
        value = "foo"
    }
    custom_header {
        name = "X-Bar"
        value = "bar"
    }
  }
  description = "%s"
  events = [
    "incident.acknowledged",
    "incident.annotated",
    "incident.delegated",
    "incident.escalated",
    "incident.priority_updated",
    "incident.reassigned",
    "incident.reopened",
    "incident.resolved",
    "incident.responder.added",
    "incident.responder.replied",
    "incident.status_update_published",
    "incident.triggered",
    "incident.unacknowledged"
  ]
  active = true
  filter {
    id = data.pagerduty_service.example.id
    type = "service_reference"
  }
  type = "webhook_subscription"
}

Argument Reference

The following arguments are supported:

Webhook delivery method (delivery_method) supports the following:

Webhook filter (filter) supports the following:

Attributes Reference

The following attributes are exported:

Import

Webhook Subscriptions can be imported using the id, e.g.

$ terraform import pagerduty_webhook_subscription.main PUABCDL