Does anyone understand why the wfm schedule resource fails with a 409 conflict during apply?
environment details:
terraform v1.9.8
genesyscloud provider v1.65.2
region: australia/sydney
i am trying to automate wfm schedule creation via terraform. the schedule already exists in the ui. i run terraform import to pull the state. the import succeeds. i can see the resource in the state file with the correct id.
when i run terraform apply, it detects no changes in the config, but then fails with a 409 conflict. the error message is vague. it just says “conflict”. no details on what is conflicting.
hcl snippet:
resource "genesyscloud_wfm_user_schedule" "test_sched" {
name = "test_schedule"
description = "automated via terraform"
schedule_type = "user"
start_time = "2024-01-01T00:00:00Z"
end_time = "2024-12-31T23:59:59Z"
intervals {
day_of_week = "monday"
start_time = "09:00"
end_time = "17:00"
type = "available"
}
}
the api endpoint used is /api/v2/wfm/schedules/user. i checked the network tab in the browser. the schedule is active. no other processes are touching it.
i tried adding lifecycle ignore_changes, but that does not help. the apply still fails. i suspect the provider is trying to update a read-only field or there is a race condition with the wfm service.
has anyone seen this with wfm resources? the outbound campaign resources work fine. integrations work fine. just wfm schedules seem to have this issue.
i need to automate this for production deployment. manual creation is not an option. any insights on how to bypass this conflict or what field is causing it would be appreciated.
thanks.