How should I properly to handle the genesyscloud_routing_outbound_campaign resource when the API rejects the config with a 422 error during terraform apply?
Running in AU-1 BYOC with provider genesyscloud v1.68.4.
The deployment pipeline uses GitHub Actions to push state changes.
The HCL block looks valid:
resource "genesyscloud_routing_outbound_campaign" "test_campaign" {
name = "Test Predictive Campaign"
description = "Managed by Terraform"
enabled = true
calling_view_id = var.calling_view_id
rule {
name = "Default Rule"
# ... other rule config
}
}
Error log:
Error: PUT /api/v2/routing/outbound/campaigns: 422 Unprocessable Entity
The response body mentions:
"message": "Validation failed for field 'rule'. Invalid rule configuration for predictive mode."
I have verified the calling_view_id exists and is active. The rule configuration matches the JSON schema returned by a manual GET request on a working campaign. Yet Terraform refuses to apply the resource.
Is there a specific attribute missing in the HCL that is required for Predictive Routing but not documented? Or is this a known limitation with the current provider version in the BYOC region?