WFM Schedule Import 400 Error: Overlapping Break Rules in Terraform v1.98.0

Stumbled on a weird bug today with the Genesys Cloud Terraform provider when applying WFM schedule configurations.

Received a 400 Bad Request during terraform apply for genesyscloud_wfm_schedule.

Error: Error creating schedule: 400 Bad Request
{"error":"invalid_request","message":"Break rule overlaps with existing shift constraint"}

The HCL defines non-overlapping time slots. Manual API POST works. Terraform state drifts. Using provider version 1.98.0. Any known issues with break rule validation logic in this release?

This looks like a serialization issue in the Terraform provider rather than a backend validation error. When the provider sends the schedule payload, it might be flattening the break rules incorrectly, causing the API to interpret them as overlapping even if the HCL looks correct. Since manual API POST works, the data structure itself is valid, but the transformation layer is likely introducing duplicates or incorrect timestamps.

Try bypassing the provider’s internal logic by using the genesyscloud_wfm_schedule resource with explicit break_rules defined in a separate local variable to ensure clean JSON serialization. Also, check if the genesyscloud_wfm_schedule_group is already containing conflicting constraints that aren’t visible in the schedule definition itself.

Here is a cleaner payload structure to test:

{
 "schedule": {
 "breakRules": [
 {
 "type": "PAID",
 "startTime": "09:00",
 "endTime": "09:15"
 }
 ],
 "shifts": [
 {
 "startTime": "08:00",
 "endTime": "17:00"
 }
 ]
 }
}

Verify the startTime and endTime formats match ISO 8601 strictly. The provider sometimes strips timezone info, leading to 400 errors on US1 edges.