Skip to content

Add incident_type action to Event Orchestration global and service paths#1095

Draft
pdt-svillanelo wants to merge 2 commits into
PagerDuty:masterfrom
pdt-svillanelo:add-incident-type-to-event-orchestration
Draft

Add incident_type action to Event Orchestration global and service paths#1095
pdt-svillanelo wants to merge 2 commits into
PagerDuty:masterfrom
pdt-svillanelo:add-incident-type-to-event-orchestration

Conversation

@pdt-svillanelo

Copy link
Copy Markdown

Summary

Adds incident_type as a new action attribute on pagerduty_event_orchestration_global and pagerduty_event_orchestration_service resources, allowing Terraform users to set the incident type for incidents created by orchestration rules.

Changes

event_orchestration_path_util.go

  • New schema: eventOrchestrationIncidentTypeObjectSchema with id (Required) and name (Required)
  • New expand function: expandEventOrchestrationPathIncidentType — converts Terraform config to Go struct
  • New flatten function: flattenEventOrchestrationPathIncidentType — converts Go struct to Terraform state

resource_pagerduty_event_orchestration_path_global.go

  • Added incident_type to eventOrchestrationPathGlobalCatchAllActionsSchema (TypeList, MaxItems: 1)
  • Wired into expandGlobalPathActions and flattenGlobalPathActions

resource_pagerduty_event_orchestration_path_service.go

  • Added incident_type to buildEventOrchestrationPathServiceCatchAllActionsSchema (TypeList, MaxItems: 1)
  • Wired into expandServicePathActions and flattenServicePathActions

Usage

resource \"pagerduty_event_orchestration_global\" \"example\" {
  event_orchestration = pagerduty_event_orchestration.example.id

  set {
    id = \"start\"
    rule {
      actions {
        incident_type {
          id   = \"PT1234A\"
          name = \"security_incident\"
        }
      }
    }
  }

  catch_all {
    actions {}
  }
}

Attributes

  • incident_type - (Optional) Set the incident type for the resulting incident.
    • id - (Required) The incident type id
    • name - (Required) The incident type name

Notes

Context

Related PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant