• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      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? 

       

       

            [OPSGENIE-1153] Terraform cannot create Webhook integration.

            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:

            • Triggering on acknowledge or close (i.e. configuring forwarding action mappings). Seems only to work with Create.
            • Enabling "Add alert description to payload"
            • Enabling "Add alert details to payload"

            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.

            Jens Båvenmark added a comment - 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: Triggering on acknowledge or close (i.e. configuring forwarding action mappings). Seems only to work with Create. Enabling "Add alert description to payload" Enabling "Add alert details to payload" 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.

            exeding added a comment -

            i can confirm this issue. With the current integration the webhook functionality cannot be used from within Terraform

            exeding added a comment - i can confirm this issue. With the current integration the webhook functionality cannot be used from within Terraform

              Unassigned Unassigned
              abarnard@atlassian.com Allen Barnard
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: