go-pagerduty icon indicating copy to clipboard operation
go-pagerduty copied to clipboard

Feature Request: Support setting on_call_handoff_notifications on pagerduty_escalation_policy

Open jjm opened this issue 1 year ago • 0 comments

The API for https://api.pagerduty.com/escalation_policies supports setting on_call_handoff_notifications, but this is not exposed in Terraform. Which always ends up as the default if_has_services.

We'll like to override this default and set to always, however this seems to be missing from the Go library too.

Example resource for this setting would be:

resource "pagerduty_escalation_policy" "example" {
  name      = "Engineering Escalation Policy"
  num_loops = 2
  teams     = [pagerduty_team.example.id]

  on_call_handoff_notifications = "always"

  rule {
    escalation_delay_in_minutes = 10
    target {
      type = "user_reference"
      id   = pagerduty_user.example.id
    }
    target {
      type = "user_reference"
      id   = pagerduty_user.example2.id
    }
  }
}

jjm avatar Mar 03 '23 17:03 jjm