pactflow / terraform-provider-pact

Terraform provider for Pact Broker (and Pactflow)
https://pactflow.io
MIT License
24 stars 4 forks source link

Specifying contract_changed_event as a webhook event causes a bad request error #3

Closed garry-jeromson closed 4 years ago

garry-jeromson commented 4 years ago

Description

When creating a pact_webhook resource, supplying contract_changed_event (as suggested in the examples and documentation) in the list of values for the event attribute leads to an "Error: bad request" failure when running a terraform apply:

resource "pact_webhook" "provider_verification_published" {
...
  events     = ["contract_event_changed"]
}

At first glance, it would seem like contract_changed_event is the wrong event type value to pass to the API; it's inconsistent with the broker client, which uses the value contract_content_changed.

garry-jeromson commented 4 years ago

The cause of the issue is more or less confirmed by the webhook API docs: https://docs.pact.io/pact_broker/advanced_topics/api_docs/webhooks.

mefellows commented 4 years ago

v0.0.3 is currently on the way out with this fix (see https://travis-ci.org/github/pactflow/terraform/builds/698870592).