Trying to set up a disaster recovery snapshot for our org using the CX as Code terraform provider. The goal is to export the entire configuration into a local state file so we can replay it in a DR account if things go south. I have the basic provider block set up with my client ID and secret, but I’m stuck on the actual export command.
I tried running:
terraform import genesyscloud_user.user_1 12345678-1234-1234-1234-123456789abc
This works for single resources, but I need to pull everything. Users, flows, integrations, the works. I found a reference to genesyscloud-export in the docs, but when I run:
genesyscloud-export --output dr_backup.tf
It just hangs for a bit and then throws:
Error: could not retrieve resource: 403 Forbidden
I’ve checked the OAuth token and it has full admin scope. The error points to the user resource specifically. Is there a specific permission I’m missing or a different CLI flag needed for a full org dump? The standard terraform plan doesn’t seem to capture the dynamic data like user lists anyway.
Here is my provider config:
provider "genesyscloud" {
client_id = var.genesys_cloud_client_id
client_secret = var.genesys_cloud_client_secret
base_url = "https://api.mypurecloud.com"
}
Any ideas on how to bulk export without manually importing thousands of resources?