Skip to main content

Terraform for Acumatica ERP. Extract a live Acumatica company into YAML and rebuild UAT

  • August 24, 2026
  • 0 replies
  • 5 views

kborovik
Freshman I

I wrote the CLI tool that extracts that configuration into YAML and rebuilds a virgin UAT from the files.

https://github.com/kborovik/acumatica-cli

PyPI package acumatica-cli, command acu. Requires Python 3.14+.

If you have used Terraform: this is the same loop, pointed at an Acumatica tenant instead of cloud resources. Terraform keeps desired infrastructure as files and makes the live account match those files. acu keeps desired company setup as YAML and makes a live tenant match those files. There is no separate Terraform-style state file. The YAML is the source of truth, and diff reads the tenant over the contract REST API.

acu extract is closest to terraform import. It pulls a source Acumatica tenant into config/. That step is read-only; nothing writes back.

acu apply is terraform apply. It makes a virgin tenant match the files (idempotent keyed PUTs). apply is the only writer.

acu diff is terraform plan. It compares the files to the tenant and exits 2 when they diverge.

acu run replays business scenarios from scenario/ YAML: AP (purchase order, receipt, bill, payment) and AR (sales order, shipment, invoice, payment), plus a GL capital journal and kit assembly. Terraform has nothing like this. It only creates and updates resources until they match the files; it does not post AP or AR transactions.

acu state is not Terraform state. It records trial-balance observations as evidence.

What it can do

- Pull live config into YAML (extract)
- Seed a tenant from that YAML (apply)
- Detect drift against the YAML (diff)
- Replay business scenarios (run): AP and AR transactions, plus GL capital and kit assembly
- Capture derived balances such as trial balance (state)
- Create, delete, and recycle tenants over SSH (tenant)
- Publish the Bootstrap contract (bootstrap), or export a zip for SM204505
- Scaffold a data repo and preflight the target (config init, config check)
- Prove a cold rebuild: create, apply, run, diff (check)

Seed YAML covers features, company, credit terms, subaccounts, chart of accounts, ledger, UOMs, financial year and periods, numbering sequences, inventory and distribution masters, roles, and users.

What I use it for

- Extract a live company into git and review the tree in a pull request
- Rebuild a virgin UAT as a configuration twin of production: same setup from files, not a restored snapshot
- Run a scenario pack as the UAT readiness gate, so testers can open real document chains on day one
- Close the rebuild with a clean diff and Account Summary (GL401000) books
- Re-extract and rebuild when production setup changes
- Seed an empty tenant from YAML when there is no live company to extract
- Prove a live tenant still matches the files
- Recreate a demo tenant after a walkthrough left it dirty
- Rebuild the same company on a newer major, without a matching snapshot ZIP

Typical loop, starting from a live company:

uv tool install acumatica-cli

acu --tenant PROD extract --out . --force
acu --tenant PROD state --out state/prod

acu tenant create --login UAT
acu --tenant UAT apply config/
acu --tenant UAT run scenario/
acu --tenant UAT diff config/
acu --tenant UAT state --out state/uat

Verified on:

- 26 R1: 26.101.0225 / Default API 25.200.001
- 25 R2: 25.201.0213 / Default API 25.200.001
- 25 R1: 25.101.0153 / Default API 24.200.001

Full extract to UAT path: https://lab5.ca/blog/acumatica-live-company-to-rebuildable-uat/

Walkthrough (live config to UAT tenant): https://youtu.be/GtDVxYcKPr8

Happy to answer questions here, or on GitHub issues. If you try it on a version I have not pinned, I want to hear what broke.