pagerduty_incident_workflow_trigger

An Incident Workflow Trigger defines when and if an Incident Workflow will be triggered.

Example Usage

resource "pagerduty_incident_workflow" "my_first_workflow" {
  name         = "Example Incident Workflow"
  description  = "This Incident Workflow is an example"
  step {
    name           = "Send Status Update"
    action         = "pagerduty.com:incident-workflows:send-status-update:1"
    input {
      name = "Message"
      value = "Example status message sent on {{current_date}}"
    }
  }
}

data "pagerduty_service" "first_service" {
  name = "My First Service"
}

resource "pagerduty_incident_workflow_trigger" "automatic_trigger" {
  type                       = "conditional"
  workflow                   = pagerduty_incident_workflow.my_first_workflow.id
  services                   = [pagerduty_service.first_service.id]
  condition                  = "incident.priority matches 'P1'"
  subscribed_to_all_services = false
}

data "pagerduty_team" "devops" {
  name = "devops"
}

resource "pagerduty_incident_workflow_trigger" "manual_trigger" {
  type       = "manual"
  workflow   = pagerduty_incident_workflow.my_first_workflow.id
  services   = [pagerduty_service.first_service.id]
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Incident workflows can be imported using the id, e.g.

$ terraform import pagerduty_incident_workflow.pagerduty_incident_workflow_trigger PLBP09X