Terraform export command fails on 50k+ entities with OOM

Running terraform export for our full org config hits a hard wall. The process chugs along for 45 minutes then the node process dies with an out of memory error before it ever spits out a plan file. We’ve got a massive amount of IVR scripts and routing profiles that seem to be choking the exporter.

  • CXone Org with ~50,000 active entities
  • Node v18.17 LTS on an 8GB instance
  • Command: npx @nice-dcx/cx-as-code export --orgId <id>
  • Tried limiting scope to just ivr module but it still crashes

Is there a flag to chunk the export or is the only fix to spin up a beefier box?