Validate
Progress checklist
Overview
Section titled “Overview”Joint gate after each Region’s hub-peering checks. Requires
enable_prod_workloads=true (all four A records). Then
Prove mesh before attaching NFW.
Compare
Section titled “Compare”-
Dump stack outputs:
Terminal window cd environment/sandbox/ap-southeast-2/hub-peeringecho "=== hub-peering ==="terraform output -raw peering_attachment_idterraform output -raw dns_zone_nameterraform 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_cidrs=== hub-peering ===tgw-attach-0ef352cc0c6405026lab.demosyd-dev.lab.demoakl-dev.lab.demosyd-prod.lab.demoakl-prod.lab.demotolist(["10.255.1.0/24","10.255.2.0/24",])tolist(["10.254.1.0/24","10.254.2.0/24",]) -
Assert spoke CIDR lists still mirror the hubs:
Terminal window SYD_LOCAL=$(cd ../hub && terraform output -json local_spoke_cidrs)AKL_LOCAL=$(cd ../../ap-southeast-6/hub && terraform output -json local_spoke_cidrs)SYD_PEER=$(terraform output -json syd_spoke_cidrs)AKL_PEER=$(terraform output -json akl_spoke_cidrs)test "$SYD_LOCAL" = "$SYD_PEER" && test "$AKL_LOCAL" = "$AKL_PEER" \&& echo "peering spoke CIDRs match hubs OK" \|| echo "peering spoke CIDRs do NOT match hubs"peering spoke CIDRs match hubs OK -
All four A records vs live host IPs:
Terminal window export AWS_PROFILE=YOUR_DEV_WORKLOAD_PROFILESYD_DEV_IP=$(cd ../workload-dev && terraform output -raw test_host_private_ip)AKL_DEV_IP=$(cd ../../ap-southeast-6/workload-dev && terraform output -raw test_host_private_ip)SYD_PROD_IP=$(cd ../workload-prod && terraform output -raw test_host_private_ip)AKL_PROD_IP=$(cd ../../ap-southeast-6/workload-prod && 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[?Type=='A'].[Name,ResourceRecords[0].Value]" \--output textecho "expect syd-dev=$SYD_DEV_IP akl-dev=$AKL_DEV_IP syd-prod=$SYD_PROD_IP akl-prod=$AKL_PROD_IP"akl-dev.lab.demo. 10.254.1.31akl-prod.lab.demo. 10.254.2.22syd-dev.lab.demo. 10.255.1.58syd-prod.lab.demo. 10.255.2.69expect syd-dev=10.255.1.58 akl-dev=10.254.1.31 syd-prod=10.255.2.69 akl-prod=10.254.2.22 -
Peering available in both Regions:
Terminal window export AWS_PROFILE=YOUR_HUB_PROFILEPEER=$(terraform output -raw peering_attachment_id)aws ec2 describe-transit-gateway-attachments --region ap-southeast-2 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayAttachments[0].State' --output textaws ec2 describe-transit-gateway-attachments --region ap-southeast-6 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayAttachments[0].State' --output textavailableavailable -
Peer assoc is no_inspection on both sides (NFW not attached yet):
Terminal window PEER=$(terraform output -raw peering_attachment_id)SYD_NO=$(cd ../hub && terraform output -raw no_inspection_route_table_id)AKL_NO=$(cd ../../ap-southeast-6/hub && terraform output -raw no_inspection_route_table_id)SYD_ASSOC=$(aws ec2 describe-transit-gateway-attachments --region ap-southeast-2 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayAttachments[0].Association.TransitGatewayRouteTableId' --output text)AKL_ASSOC=$(aws ec2 describe-transit-gateway-attachments --region ap-southeast-6 \--transit-gateway-attachment-ids "$PEER" \--query 'TransitGatewayAttachments[0].Association.TransitGatewayRouteTableId' --output text)echo "syd assoc=$SYD_ASSOC (expect no_insp=$SYD_NO)"echo "akl assoc=$AKL_ASSOC (expect no_insp=$AKL_NO)"syd assoc=tgw-rtb-00be3893a2741a265 (expect no_insp=tgw-rtb-00be3893a2741a265)akl assoc=tgw-rtb-0de1397f3982b6434 (expect no_insp=tgw-rtb-0de1397f3982b6434)