Why does this config cause a persistent 409 Conflict when applying the genesyscloud_wfm_schedule_group resource via Terraform? The deployment pipeline fails at the schedule group creation step, even though the API documentation suggests that overlapping constraints should be handled by the backend logic. The error payload indicates a duplicate key violation on the locationId and userId combination, but the Terraform state file shows these resources are distinct and correctly referenced. This happens consistently during the promotion from the staging environment to production, where the user count is significantly higher. The specific error returned is 409 Conflict: A schedule group with the same location and user already exists, which is misleading because no such group exists in the Genesys Cloud UI for those specific users.
Environment details are as follows: Terraform Provider version 1.15.2, Genesys Cloud CLI version 1.0.0, and the region is AU1. The WFM provider configuration uses the standard OAuth2 authentication method. The Terraform configuration defines multiple schedule groups for different departments, each with unique name and description fields. The users block within each schedule group references user IDs that are managed separately in the genesyscloud_user resource. The issue arises when two schedule groups attempt to assign the same user to different shifts, which is a valid business requirement for part-time staff working across departments. The API seems to enforce a one-to-one relationship between a user and a schedule group, contrary to the expected many-to-many relationship documented in the WFM API specs.
Investigating the API response headers reveals that the X-Request-Id correlates with a backend validation error in the WFM service. Attempts to use the ignore_missing flag or adjust the lifecycle ignore rules in Terraform have not resolved the conflict. The question is whether this is a known limitation in the current provider version or if there is a specific API parameter that needs to be set to allow multiple schedule group assignments for a single user. Any insights on how to structure the Terraform code to bypass this validation error would be appreciated. The goal is to automate the schedule group creation without manual intervention in the UI.