Lately I've been reviewing network paths between accounts in a multi-account AWS setup. Transit Gateway (TGW) makes connecting VPCs easy — but with the default settings, every attached VPC can reach every other one , which is not what you want from a data-leak point of view.
In this post I lay out, in Terraform and diagrams, a TGW route-table design where prod and dev can't talk to each other, but both can reach shared services :
the difference between association and propagation
why you should turn the defaults off
blackhole routes as a safety net against mistakes
a tiny checker that builds a reachability matrix straight from the Terraform code
The screenshots are real runs on my Linux box — but they are static analysis of the Terraform code , not results from an applied AWS environment (CIDRs and IDs are dummies).
Target design
from \ to prod dev shared
prod - NG OK
dev NG - OK
shared OK OK -
Terminology: association vs.…