WFM Schedule API 409 Conflict during Terraform Apply on genesyscloud_wfm_user_schedule

Getting a 409 Conflict error when applying Terraform changes to user schedules in the AU region. The pipeline fails specifically on the genesyscloud_wfm_user_schedule resource during the initial deployment phase.

Environment:

  • Terraform v1.6.4
  • Genesys Cloud Provider v2.12.0
  • Region: AU (Sydney)
  • Target: genesyscloud_wfm_user_schedule

The HCL block is straightforward:

resource "genesyscloud_wfm_user_schedule" "agent_schedule" {
 user_id = var.agent_user_id
 schedule_id = var.schedule_template_id
 start_date = "2023-10-01"
 end_date = "2023-10-31"
}

Error log snippet:

{
 "code": 409,
 "message": "Conflict: Schedule already exists for this user in the specified time range."
}

The issue seems to be that the Terraform provider does not detect the existing schedule created manually via the UI before the first terraform apply. Subsequent applies work fine if the state is imported, but fresh deployments crash.

Is there a flag to force overwrite or a specific API endpoint to check for existing WFM schedule conflicts before the Terraform provider attempts the POST? Need this resolved for our automated onboarding pipeline. Currently blocking the promotion to staging.

The 409 conflict typically stems from concurrent writes or version mismatches in the WFM schedule engine. Ensure your Terraform configuration includes a depends_on block for the user resource to guarantee existence before scheduling. Also, verify no manual edits occurred in the UI during the apply window, as this invalidates the ETag used for optimistic locking.