Skip to content

Teardown

Destroy in reverse dependency order to avoid orphaned allocations and RAM share errors.

  1. workload-a/ and workload-b/ (parallel OK)
  2. ipam/ (network account)
  3. org-bootstrap/ (management account — optional)
Terminal window
export AWS_PROFILE=ipam-workload-a
export AWS_REGION=ap-southeast-6
aws sts get-caller-identity
terraform -chdir=examples/multi-account/workload-a destroy
export AWS_PROFILE=ipam-workload-b
export AWS_REGION=ap-southeast-2
aws sts get-caller-identity
terraform -chdir=examples/multi-account/workload-b destroy
Terminal window
export AWS_PROFILE=ipam-network
export AWS_REGION=ap-southeast-6
aws sts get-caller-identity
terraform -chdir=examples/multi-account/ipam destroy
Terminal window
export AWS_PROFILE=ipam-org
aws sts get-caller-identity
terraform -chdir=examples/multi-account/org-bootstrap destroy

Only run this if you need to remove IPAM delegation and RAM org sharing entirely.

SymptomRecovery
Pool destroy blocked by allocationsRe-run workload destroy; check Allocations tab
RAM share still associatedEnsure workloads destroyed; wait for allocation cleanup
Org-bootstrap destroy blockedRemove IPAM instance and pools first

See Troubleshooting if destroy fails after following the order above.

Upstream: examples/multi-account/