Encountering persistent 409 Conflict errors when attempting to import existing WFM Schedule Groups into state using the Genesys Cloud Terraform Provider (v1.13.0). The deployment pipeline runs via GitHub Actions in the AP-SYD region.
The HCL configuration defines a genesyscloud_wfm_schedule_group resource. Initial terraform apply succeeds. Subsequent runs attempt to import the resource to manage it via IaC. The import command fails with the following error:
Error: Error importing "genesyscloud_wfm_schedule_group.main" (id=abc-123-def):
409 Conflict: The requested resource is currently being modified by another process.
Please retry later.
Retrying does not resolve the issue. The error persists for hours. Checking the Genesys Cloud admin console shows no active edits on the schedule group. The status is ACTIVE.
Suspect a locking mechanism in the WFM service that is not compatible with the provider’s import logic. Or, the API endpoint /api/v2/wfm/schedulegroups/{id} returns a stale lock state.
Has anyone successfully imported WFM Schedule Groups post-creation? Is there a workaround in the HCL block? Maybe a lifecycle ignore_changes block? Or does the provider require a specific delay before import?
Current HCL snippet:
resource "genesyscloud_wfm_schedule_group" "main" {
name = "DevOps Schedule Group"
description = "Managed by Terraform"
lifecycle {
# Attempted to ignore external changes
ignore_changes = [description]
}
}
The provider logs show the GET request returns 200, but the subsequent PUT during import fails with 409. This breaks the CI/CD promotion strategy. Cannot manage WFM via code if import is unstable. Need a reliable method to sync state without manual console intervention. Any insights on the WFM API locking behavior?