terraform-provider-pagerduty
terraform-provider-pagerduty copied to clipboard
PagerDuty Change Event transformer integrations are not supported
Terraform Version
1.3.7
- I see nothing in later changelogs that addresses this.
Affected Resource(s)
- pagerduty_service_integration
Terraform Configuration Files
resource "pagerduty_service_integration" "example" {
service = pagerduty_service.service.id
name = "Example Name"
type = "change_event_transform_inbound_integration" // <- Problem
vendor = null
integration_key = null
integration_email = null
}
Debug Output
https://gist.github.com/DoctorPolski/e08d0104f41e1029b0731c4fbaacf12e
Expected Behavior
Resource should be created.
Actual Behavior
Resource could not be created.
Steps to Reproduce
- Create a
Custom Change Event Transformer
integration on an existing technical service on the PagerDuty Console - Import this into a skeleton
pagerduty_service_integration
resource - Plan
- Observe in plan that PagerDuty console has created the integration with type of
change_event_transform_inbound_integration
- Update resource to use this type
- Plan or Apply and observe that Terraform demands the type be from a list which does contain
change_event_transform_inbound_integration
Important Factoids
I believe this is simply a case of the provider not keeping up to date with the range of possible generic integration types now offered by PagerDuty.
That type isn't an option via the PagerDuty API either:
https://developer.pagerduty.com/api-reference/43e0864d370fb-create-a-new-integration
However, you can use the vendor
argument with the name Custom Change Event Transformer
instead of type
:
data "pagerduty_vendor" "main" {
name = "Custom Change Event Transformer"
}
resource "pagerduty_service_integration" "main" {
name = "Custom change event"
service = "P123456"
vendor = data.pagerduty_vendor.main.id
}
Imported into state the data/resources will be similar to:
This may be of limited use to you though, as the config
field isn't exposed via the API either, so you can't configure custom JS code.
Refs:
- Closed TF provider issues:
- https://github.com/PagerDuty/terraform-provider-pagerduty/issues/539
- Docs for transformer with note on new preferred method: https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTc5-custom-event-transformer
@modwyer42 I tried this and it works perfectly. Thank you.
And yes, it really would be helpful if we could access the config to allow the management of the required JS.