Sydney
Progress checklist
Overview
Section titled “Overview”One Terraform stack under ap-southeast-2/hub-peering creates both sides of
TGW peering, static remote spoke routes, private zone lab.demo, cross-account
VPC association, and DHCP search domains.
While hubs still have enable_network_firewall=false, the peer stays on
no_inspection (passthrough mesh). Re-applying this stack after NFW is
attached moves the peer onto the inspection RTs for double-inspect — see
Inspection model.
Apply here (Sydney path). Validate this Region’s peer view, route, and DNS before Auckland. After both regional pages, do Hub peering → Validate.
Apply only after Workloads (dev) → Validate.
If workload-prod is already up, set
enable_prod_workloads=true on this apply; otherwise leave false and re-apply
after prod (required before Hub peering → Validate).
-
Configure and apply:
Terminal window cd environment/sandbox/ap-southeast-2/hub-peeringcp terraform.tfvars.example terraform.tfvars# profiles; enable_prod_workloads=true if prod stacks existterraform initterraform apply -
Capture outputs:
Terminal window export AWS_PROFILE=YOUR_HUB_PROFILEPEER=$(terraform output -raw peering_attachment_id)terraform output -raw peering_attachment_idterraform output -raw syd_dev_hostnameterraform output -raw akl_dev_hostnameterraform output -raw syd_prod_hostnameterraform output -raw akl_prod_hostnameterraform output syd_spoke_cidrsterraform output akl_spoke_cidrstgw-attach-0ef352cc0c6405026syd-dev.lab.demoakl-dev.lab.demosyd-prod.lab.demo # null until enable_prod_workloads=trueakl-prod.lab.demotolist([ "10.255.1.0/24", "10.255.2.0/24" ]) # prod CIDR after enabletolist([ "10.254.1.0/24", "10.254.2.0/24" ])
Validate
Section titled “Validate”-
Sydney peering attachment (requester → Auckland TGW):
Terminal window aws ec2 describe-transit-gateway-peering-attachments \--region ap-southeast-2 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayPeeringAttachments[0].{State:State,Local:RequesterTgwInfo.TransitGatewayId,Remote:AccepterTgwInfo.TransitGatewayId}' \--output table-----------------------------------------------------------------| DescribeTransitGatewayPeeringAttachments |+------------------------+-------------------------+------------+| Local | Remote | State |+------------------------+-------------------------+------------+| tgw-04fc7f3ccf224fdf2 | tgw-04db3776f3a795ce7 | available |+------------------------+-------------------------+------------+ -
Peer attachment association (no_inspection while NFW off):
Terminal window SYD_NO=$(cd ../hub && terraform output -raw no_inspection_route_table_id)aws ec2 describe-transit-gateway-attachments \--region ap-southeast-2 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayAttachments[0].{State:State,Assoc:Association.TransitGatewayRouteTableId}' \--output tableecho "expect Assoc == $SYD_NO (passthrough)"--------------------------------------------| DescribeTransitGatewayAttachments |+----------------------------+-------------+| Assoc | State |+----------------------------+-------------+| tgw-rtb-00be3893a2741a265 | available |+----------------------------+-------------+expect Assoc == tgw-rtb-00be3893a2741a265 (passthrough) -
Static routes to Auckland spokes via the peer (no-inspection RT):
Terminal window SYD_NO=$(cd ../hub && terraform output -raw no_inspection_route_table_id)aws ec2 search-transit-gateway-routes \--region ap-southeast-2 \--transit-gateway-route-table-id "$SYD_NO" \--filters "Name=route-search.subnet-of-match,Values=10.254.0.0/16" \--query 'Routes[].{Dest:DestinationCidrBlock,Attach:TransitGatewayAttachments[0].TransitGatewayAttachmentId,State:State}' \--output table-------------------------------------------------------------| SearchTransitGatewayRoutes |+-------------------------------+-----------------+---------+| Attach | Dest | State |+-------------------------------+-----------------+---------+| tgw-attach-0ef352cc0c6405026 | 10.254.1.0/24 | active || tgw-attach-0ef352cc0c6405026 | 10.254.2.0/24 | active |+-------------------------------+-----------------+---------+ -
syd-dev.lab.demoA record matches the Sydney host IP:Terminal window SYD_IP=$(cd ../workload-dev && terraform output -raw test_host_private_ip)ZONE=$(aws route53 list-hosted-zones-by-name --dns-name lab.demo. \--query 'HostedZones[?Config.PrivateZone==`true`].Id' --output text | sed 's|/hostedzone/||' | head -1)aws route53 list-resource-record-sets \--hosted-zone-id "$ZONE" \--query "ResourceRecordSets[?Name=='syd-dev.lab.demo.'].[Name,ResourceRecords[0].Value]" \--output textecho "expect A == $SYD_IP"syd-dev.lab.demo. 10.255.1.58expect A == 10.255.1.58 -
Sydney spoke DHCP search domain:
Terminal window export AWS_PROFILE=YOUR_DEV_WORKLOAD_PROFILESYD_VPC=$(cd ../workload-dev && terraform output -raw vpc_id)DHCP=$(aws ec2 describe-vpcs --region ap-southeast-2 --vpc-ids "$SYD_VPC" \--query 'Vpcs[0].DhcpOptionsId' --output text)aws ec2 describe-dhcp-options --region ap-southeast-2 --dhcp-options-ids "$DHCP" \--query 'DhcpOptions[0].DhcpConfigurations[?Key==`domain-name` || Key==`domain-name-servers`]' \--output json[{"Key": "domain-name","Values": [{ "Value": "lab.demo" }]},{"Key": "domain-name-servers","Values": [{ "Value": "AmazonProvidedDNS" }]}]