Terraform CX as Code: Handling 409 conflicts during full org export for DR

We are building a disaster recovery pipeline using the Genesys Cloud CX as Code Terraform provider. The goal is to export the entire organization configuration to a remote state file for backup purposes. We are using the genesyscloud_resource_export data source with a specific filter list to capture queues, users, and routing settings.

The export runs successfully for the first few hours. However, we start hitting 409 Conflict errors on resources that have circular dependencies or are currently being modified by live agents. The Terraform plan fails with this error:

Error: 409 Conflict
Details: Resource is currently in use or has conflicting changes.

We have tried adding ignore_changes blocks, but that doesn’t help since we are trying to read the state, not apply it. Is there a way to configure the provider to skip failing resources or retry with a longer timeout? We need a reliable way to snapshot the config without halting the entire export process. The current approach feels too brittle for a production DR strategy.

Not a expert here, but that 409 usually means concurrent writes. Try adding depends_on to your resources to serialize the apply. Or just retry the failed resources with an exponential backoff in your script. The API is strict about state consistency during bulk ops.