Skip to content

Workload Deploy

Stacks workload-a/ and workload-b/ can run in parallel after ipam/ completes.

Each workload receives pool_id from ipam/ outputs via gitignored terraform.tfvars:

# workload-a/terraform.tfvars (gitignored — use real pool ID from ipam output)
pool_id = "ipam-pool-0123456789abcdef0"

The VPC is created from the shared pool via modules/ipam-vpc/:

module "vpc" {
source = "../modules/ipam-vpc"
ipv4_ipam_pool_id = var.pool_id
ipv4_netmask_length = 20
}
FieldValue
AccountDev
Profileipam-workload-a
Regionap-southeast-6
Poolorg/nz/dev (nz_dev_pool_id)
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 init
terraform -chdir=examples/multi-account/workload-a apply
FieldValue
AccountSandbox
Profileipam-workload-b
Regionap-southeast-2
Poolorg/au/sandbox (au_sandbox_pool_id)
Terminal window
export AWS_PROFILE=ipam-workload-b
export AWS_REGION=ap-southeast-2
aws sts get-caller-identity
terraform -chdir=examples/multi-account/workload-b init
terraform -chdir=examples/multi-account/workload-b apply
Terminal window
terraform -chdir=examples/multi-account/workload-a output vpc_cidr # 10.64.0.0/20
terraform -chdir=examples/multi-account/workload-b output vpc_cidr # 10.128.0.0/20
  • Each workload VPC CIDR allocated from the intended shared pool (/20)
  • Pool allocations visible to IPAM admin account (may lag briefly)

Check Allocations first after apply; the summary dashboard may lag — see Verification.

See RAM and onboarding for the three-layer onboarding model.

Next: Verification.

Upstream: examples/multi-account/