pagerduty_event_orchestration_router

An Orchestration Router allows users to create a set of Event Rules. The Router evaluates events sent to this Orchestration against each of its rules, one at a time, and routes the event to a specific Service based on the first rule that matches. If an event doesn't match any rules, it'll be sent to service specified in the catch_all or to the "Unrouted" Orchestration if no service is specified.

Example of configuring Router rules for an Orchestration

In this example the user has defined the Router with two rules, each routing to a different service.

This example assumes services used in the route_to configuration already exists. So it does not show creation of service resource.

resource "pagerduty_event_orchestration_router" "router" {
  event_orchestration = pagerduty_event_orchestration.my_monitor.id
  set {
    id = "start"
    rule {
      label = "Events relating to our relational database"
      condition {
        expression = "event.summary matches part 'database'"
      }
      condition {
        expression = "event.source matches regex 'db[0-9]+-server'"
      }
      actions {
        route_to = pagerduty_service.database.id
      }
    }
    rule {
      condition {
        expression = "event.summary matches part 'www'"
      }
      actions {
        route_to = pagerduty_service.www.id
      }
    }
  }
  catch_all {
    actions {
      route_to = "unrouted"
    }
  }
}

Argument Reference

The following arguments are supported:

Set (set) supports the following:

Rule (rule) supports the following:

Condition (condition) supports the following:

Actions (actions) supports the following:

Catch All (catch_all) supports the following:

Attributes Reference

The following attributes are exported:

Import

Router can be imported using the id of the Event Orchestration, e.g.

$ terraform import pagerduty_event_orchestration_router.router 1b49abe7-26db-4439-a715-c6d883acfb3e