Teardown
Destroy in reverse dependency order to avoid orphaned allocations and RAM share errors.
Destroy order
Section titled “Destroy order”workload-a/andworkload-b/(parallel OK)ipam/(network account)org-bootstrap/(management account — optional)
Step 1 — Workloads
Section titled “Step 1 — Workloads”export AWS_PROFILE=ipam-workload-aexport AWS_REGION=ap-southeast-6aws sts get-caller-identityterraform -chdir=examples/multi-account/workload-a destroy
export AWS_PROFILE=ipam-workload-bexport AWS_REGION=ap-southeast-2aws sts get-caller-identityterraform -chdir=examples/multi-account/workload-b destroyStep 2 — IPAM
Section titled “Step 2 — IPAM”export AWS_PROFILE=ipam-networkexport AWS_REGION=ap-southeast-6aws sts get-caller-identityterraform -chdir=examples/multi-account/ipam destroyStep 3 — Org bootstrap (optional)
Section titled “Step 3 — Org bootstrap (optional)”export AWS_PROFILE=ipam-orgaws sts get-caller-identityterraform -chdir=examples/multi-account/org-bootstrap destroyOnly run this if you need to remove IPAM delegation and RAM org sharing entirely.
Troubleshooting destroy failures
Section titled “Troubleshooting destroy failures”| Symptom | Recovery |
|---|---|
| Pool destroy blocked by allocations | Re-run workload destroy; check Allocations tab |
| RAM share still associated | Ensure workloads destroyed; wait for allocation cleanup |
| Org-bootstrap destroy blocked | Remove IPAM instance and pools first |
See Troubleshooting if destroy fails after following the order above.
Upstream: examples/multi-account/