Skip to content

Prerequisites

  1. Clone the upstream module
  2. Work from the module repository root for all terraform -chdir=examples/multi-account/... commands in this walkthrough
AccountProfileRegionStack
Managementipam-orgGlobalorg-bootstrap/
Networkipam-networkap-southeast-6ipam/
Devipam-workload-aap-southeast-6workload-a/
Sandboxipam-workload-bap-southeast-2workload-b/

Why these regions?

This example uses ap-southeast-6 (NZ-primary dev) and ap-southeast-2 (AU sandbox). Pool locales
Region constraint on a pool — root org pool has no locale; regional and leaf pools set ap-southeast-6 or ap-southeast-2.
enforce that a NZ pool cannot allocate a VPC in Sydney — see Pool Hierarchy.

Configure one profile per account in ~/.aws/config and map each to your organization’s SSO permission sets.

Placeholder account IDs for documentation only (use real values in gitignored terraform.tfvars):

ProfilePlaceholder account ID
ipam-org333333333333
ipam-network123456789012
ipam-workload-a111111111111
ipam-workload-b222222222222
Terminal window
git clone https://github.com/tfstack/terraform-aws-ipam.git
cd terraform-aws-ipam

Each stack uses a gitignored terraform.tfvars for real account IDs and pool IDs. Example placeholders live in *.tfvars.example files only:

workload-a/terraform.tfvars.example
pool_id = "ipam-pool-0123456789abcdef0"
FileGitignoredContains
org-bootstrap/terraform.tfvarsYesNetwork account ID
ipam/terraform.tfvarsYesWorkload account IDs
workload-a/terraform.tfvarsYespool_id from ipam output
workload-b/terraform.tfvarsYespool_id from ipam output

Never commit real 12-digit account IDs or live ipam-pool-* IDs to this documentation repo or to version control in the module clone.

  • Workload-a region: ap-southeast-6 (matches org/nz/dev locale)
  • Workload-b region: ap-southeast-2 (matches org/au/sandbox locale)

See Account topology for the four-account layout.

Next: Pre-flight before your first apply.

Upstream: examples/multi-account/