Terraform: Exporting full Genesys org config for DR backup

We are setting up a disaster recovery process by exporting our entire Genesys Cloud organization configuration using the CX as Code Terraform provider. The goal is to capture all resources into state files for backup purposes. We have tried using terraform import with a generated list of resource IDs, but the process fails with dependency errors when importing queues and users simultaneously. Is there a supported method or script to export the full configuration state without manual dependency resolution?

Terraform import is a rabbit hole for full org backups. You’ll want to use the Genesys Cloud Configuration Export API instead.

curl -X POST "https://{org_id}.mygenesys.com/api/v2/configuration/export" \
 -H "Authorization: Bearer {access_token}" \
 -H "Content-Type: application/json" \
 -d '{"format": "json", "scope": "all"}'

Just be aware the export can take a while for large orgs.