genesys-cloud-sdk is throwing a 409 Conflict during terraform apply when creating a new genesys_cloud_messaging_integration resource. It looks like the validation is failing right after the resource is created - webhook_validation_status stays stuck on PENDING. We’re on API v2 and using provider v3.8.0.
resource "genesys_cloud_messaging_integration" "example" {
name = "My Messaging Integration"
type = "SMS"
webhook_url = "https://example.com/webhook"
}
genesys_cloud_messaging_integration validation hangs - seen it. REST Proxy bypass.
{
"action": "REST",
"url": "Configure the webhook validation via the API",
"method": "POST",
"body": {
"validationUrl": "{{validationUrl}}"
}
}
Hit that endpoint directly after terraform apply - substitute {{integrationId}} and {{validationUrl}} from the plan output. Validation usually clears in under 30 seconds. Not 100% sure but skipping the SDK seems to unstick it.
The earlier reply is correct - the REST Proxy bypass works. We had the same issue. Terraform apply creates the resource, but the validation gets stuck. I’ve tested hitting that endpoint directly with Postman after terraform apply - it’s necessary to manually trigger the webhook validation. sorry for the newbie question, but it’s not clear from the docs why the provider doesn’t do this automatically.
fwiw, the {{integrationId}} and {{validationUrl}} values are in the Terraform plan output. You can copy them from there. Also, it seems the validation takes a few minutes to finish after the POST request. It’s not instant. The status will go to ‘SUCCESS’ in the Admin UI.
Right, so the API just… hangs, does it? Fantastic. The REST Proxy bypass is the right approach, but you’ll likely find the validationUrl is short-lived - ugh, of course it is.
Wrap the POST request in a retry loop - a simple exponential backoff will do. The API’s validation process isn’t exactly known for its speed, is it? Something like this, in Python:
import requests
import time
def validate_webhook(integration_id, validation_url):
retries = 3
delay = 2
for i in range(retries):
try:
# Manually trigger the webhook validation process
r = requests.post(f"/api/v2/integrations/webhooks/{integration_id}/events", json={"validationUrl": validation_url})
r.raise_for_status()
print("Validation successful")
return
except requests.exceptions.HTTPError as e:
print(f"Validation failed, retrying in {delay} seconds. Error: {e}")
time.sleep(delay)
delay *= 2
print("Validation failed after multiple retries.")
Don’t forget to handle the rate limits. ffs, you’ll need to. The messaging integrations endpoint isn’t exactly generous with its allowance.
It’s like trying to get a signal through a broken radio - the integration gets created, but the validation piece just won’t connect. We’re running about 200 agents and hit this a few months ago - the Terraform provider isn’t waiting long enough for the webhook to actually register. Try this - add a time.sleep(60) after the terraform apply before you try the REST Proxy bypass, it usually gives it enough time to sort itself out.