Terraform import of entire Genesys org for DR backup

Trying to script a full org export for disaster recovery using the Genesys Cloud Terraform provider. The docs mention terraform import for single resources, but that’s tedious for an org with hundreds of queues and users.

Wrote a quick bash loop to generate the state entries:

for id in $(genesys cloud queues:list --fields id | jq -r '.[].id'); do
 terraform import genesys_cloud_call_center_queue.queue_$id $id
done

Running into issues where dependencies break because the import order isn’t guaranteed. Queues reference users and skills that might not be in the state yet.

Is there a CLI command or API endpoint that exports a complete .tf or state file for the whole org? Or do I have to manually define the dependency graph in the terraform config before importing? The genesys cloud CLI doesn’t seem to have a export-all flag.

Stuck on how to handle the circular references between users and their assigned queues during the import phase.