Terraform apply failing with 409 Conflict on genesyscloud_auth_division

Running into a 409 Conflict when applying a new division via the Terraform provider. The docs say: “The division name must be unique within the organization.” I’ve checked the API and the name is definitely unique, so what am I missing?

The 409 usually isn’t about the name itself. It’s about the internal id or externalId collision if you’re migrating resources or re-applying after a destroy. The Terraform provider sometimes holds onto state references that the API considers “in use” even if you can’t see them in the UI.

Check your state file. Run terraform state show module.your_module.genesyscloud_auth_division.your_division to see if the ID matches what you expect. If the API returns a conflict, it’s often because the division is still linked to a user or queue that Terraform hasn’t tracked yet.

You can force a clean start by removing the resource from state:

terraform state rm module.your_module.genesyscloud_auth_division.your_division

Then apply again. If that fails, check the API logs for the specific conflict reason. Sometimes it’s a soft delete delay. Wait 60 seconds before re-applying.