-
Suggestion
-
Resolution: Unresolved
-
None
Opsgenie provider [documentation hosted here|
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs/resources/api_integration] suggests we should be able to create Webhook integration using the resource opsgenie_api_integration.
This example should create a webhook integration.
resource "opsgenie_api_integration" "test3" { name = "webhook-int" type = "Webhook" responders { type = "user" id = "x1x2x3-4x5x6x7-x8x9x0-c1c2c3" } enabled = false allow_write_access = false suppress_notifications = true webhook_url = "https://api.example.com/v1" headers = { header1 = value1 } }
Instead, it throws a status code 422 error with the message [addAlertDetails] must not be null, * I have determined the missing parameter *addAlertDetails takes a boolean as its value please can you confirm if this field is being passed by the opsgenie terraform provider?
The issue is not just with Terraform. The API for Opsgenie dont allow this to be done. So for Terraform to be able to manage this that must be fixed.
This is a major issue for us as deploying our Opsgenie Integrations with IaC is a must. And it works for all other intergrations types we use but not for Webhook.
You can deploy a Webhook with Terraform, but you cannot configure it fully. You cant:
When importing manually deployed resources it will fail unless the action is Create. But when importing webhooks with action Create it will deselect Add alert description to payload and Add alert details to payload.