Just noticed that the genesyscloud_wfm_schedule resource is failing during CI pipeline execution. The Terraform apply hangs on the import step and eventually times out with a generic error.
Error: API request failed with status 400: Bad Request. Validation failed for field ‘shiftPatternId’.
The environment is Genesys Cloud AU1. Provider version 1.46.1.
The HCL block looks standard:
resource "genesyscloud_wfm_schedule" "shift_a" {
name = "Night Shift A"
type = "WEEKLY"
shift_pattern_id = var.night_shift_id
recurrence {
interval = 1
weekdays = ["MON", "TUE", "WED", "THU", "FRI"]
}
}
The shift_pattern_id is pulled from a separate data source that successfully fetches the pattern. Manual inspection in the WFM UI shows the pattern exists and is active.
However, when I capture the raw POST request sent to api/v2/wfm/schedules, the payload includes a timezone field that seems to be mismatched with the shift pattern’s configured timezone. The API logs show timezone as Australia/Sydney but the shift pattern is defined in UTC.
Is the provider stripping the timezone context from the shift pattern reference? Or is this a known issue with how the WFM API handles cross-timezone pattern assignments in IaC? Looking for a workaround to explicitly set the timezone on the schedule resource without breaking the reference to the pattern.