400 Bad Request: Invalid Shift Pattern Configuration
Deploying workforce management configurations via Terraform provider v1.65.2. Region: Australia/Sydney. The apply fails during the creation of a shift pattern resource.
resource "genesyscloud_wfm_scheduling_schedulegroup" "main" {
name = "Production Shift Group"
description = "Managed by IaC"
shift_pattern {
name = "Day Shift"
shift_pattern_id = "generated_id_placeholder"
# Omitted full schema for brevity
}
}
The error returned is:
Error: POST /api/v2/wfm/scheduling/schedulegroups failed: 400 Bad Request
{ "errors": [ { "code": "INVALID_INPUT", "message": "Shift pattern reference is invalid or not found in the specified region." } ] }
The shift pattern exists in the target org and is visible in the UI. Verified the UUID via genesyscloud_wfm_scheduling_schedulegroup data source. The pattern is active and assigned to the same business unit.
Direct API call using Postman with the same payload and headers succeeds. The Terraform provider seems to be sending a malformed reference or missing a required dependency in the request body.
Is there a specific ordering requirement for WFM resources in the Terraform state? Or is this a known bug in the provider version regarding shift pattern references in the Sydney region? Logs show no additional details beyond the 400 response.