Wfm schedule data source failing with 400 bad request on terraform apply

Does anyone understand why the genesyscloud_wfm_schedule_group data source is throwing a 400 error when trying to read existing schedules in our dev environment? i have been trying to automate the promotion of wfm schedules using terraform but the read operation keeps failing before the apply even starts.

environment details:

  • terraform v1.7.4
  • genesyscloud provider v1.25.0
  • region: ap-southeast-2
  • cli v2.1.2

the error message is quite generic:

Error: Error reading WFM schedule group: 400 Bad Request
with data.genesyscloud_wfm_schedule_group.main
on wfm.tf line 12, in data “genesyscloud_wfm_schedule_group” “main”:
12: data “genesyscloud_wfm_schedule_group” “main” {

i have verified that the api token has the wfm_schedule:read scope. tested the same token via postman against the /api/v2/wfm/schedules/groups endpoint and it returns 200 ok with valid json. the issue seems isolated to the terraform data source implementation.

looking at the debug logs, the request payload sent by the provider seems to be missing the required timezone field or perhaps the date range format is incorrect for the apac region. the documentation says it defaults to utc but our wfm setup uses australia/sydney.

also noticed that if i hardcode the schedule group id in the resource block instead of using the data source lookup, the apply works but it creates a duplicate schedule which is not what i want. i need to import or reference the existing state.

anyone else hit this with recent provider versions? is there a workaround to force the timezone parameter in the data source block? the hcl looks correct according to the registry but clearly something is breaking in the underlying api call generated by the provider. maybe a bug in version 1.25.0?

Have you tried pinning the data source to a specific name instead of relying on ID parsing? The provider often chokes on ambiguous lookups during initial state pulls.