terraform import genesyscloud_webhook.webhook_importer webhook_id_123
Error: Error retrieving webhook “webhook_id_123”: GET https://api.mypurecloud.com/api/v2/analytics/events/webhooks/webhook_id_123: 404 Not Found
I’m trying to import an existing webhook resource into my Terraform state so I can manage it via code. The ID is definitely correct since I grabbed it from the Admin UI and even verified it hits the endpoint successfully. I’ve checked the logs and the webhook is active and delivering events without issue.
I’ve tried importing it with the plain ID, the division ID appended, and even the full resource name. Nothing works. The docs say the import command should just use the ID, but the underlying GET request keeps failing. Is there a specific permission scope I’m missing on the OAuth client used by the provider? I’ve granted all analytics and admin scopes. The provider logs show the request going out fine, but GC just throws a 404 back.
Here’s the resource block I’m using:
resource “genesyscloud_webhook” “webhook_importer” {
name = “My Existing Webhook”
url = “https://my-service.com/webhook”
method = “POST”
headers = {
“Authorization” = “Bearer ${var.token}”
}
}
What am I doing wrong here?