Repository navigation
feat(network): hub-and-spoke + segregated Transit Gateway (ADR 0001 step 3) - #26
Merged
Merged
Conversation
…tep 3) Build step 3 of docs/adr/0001-network-foundation.md: the topology where tier isolation becomes a routing fact. When network.transit_gateway is set and org.workload_ous lists tiers, Template() builds a shared hub VPC (centralized gateway + org-conditioned interface endpoints), one private spoke VPC per tier, and a Transit Gateway joining them with SEGREGATED per-tier route tables: a spoke's TGW route table routes to the hub (for shared endpoints) but NOT to sibling spokes — cross-tier traffic has no path. The TGW disables default route-table association/propagation so a new attachment can't silently join a shared table and defeat the isolation. - singleVPCTemplate (step 2) unchanged + still the degrade path (TGW off or no tiers); Template() dispatches on config. - addVPC/addTGWAttachment/tgwRouteTable/tgwAssociation helpers; spoke tiers from org.WorkloadOUs (config-driven, deterministic via the step-1 allocator). - tests: topology shape (hub+3 spokes, 4 attachments, 4 route tables, no IGW), default-table-disable guard, EndpointsOnlyOnHub, Deterministic, degrade-without- tiers, and the load-bearing NoCrossSpokeRoutes invariant. Endpoints centralize on the hub (shared via TGW) — cost decision per the ADR. Verified via ground deploy --dry-run. Refs: #11, #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build step 3 of ground's network foundation (
docs/adr/0001-network-foundation.md) — the topology where tier isolation stops being just a tag and becomes a routing fact.What
When
network.transit_gatewayis set andorg.workload_ouslists tiers,Template()builds:The isolation invariant
Each spoke's TGW route table has a route to the hub (so it can reach the shared endpoints) and none to any sibling spoke — so a SensitiveResearch spoke physically cannot route to a Research spoke. The TGW also disables default route-table association/propagation, so a newly-attached VPC can't silently join a shared table and defeat the segregation.
TestHubSpoke_NoCrossSpokeRoutesasserts no spoke route table ever points at a sibling's CIDR.Structure
singleVPCTemplate(step 2) is unchanged and remains the degrade path;Template()dispatches on config (TGW off or no tiers → single VPC).TestHubSpoke_DegradesWithoutTierscovers it.org.WorkloadOUs— config-driven, deterministic via the step-1 CIDR allocator.addVPC/addTGWAttachment/tgwRouteTable/tgwAssociation.Tested (template-as-data, no AWS)
Topology shape (hub + 3 spokes = 4 VPCs, 4 attachments, 4 segregated route tables, no IGW), the no-cross-spoke-route invariant, default-table-disable guard, endpoints-only-on-hub, determinism, and degrade-without-tiers. Verified
ground deploy --dry-runrenders the hub-and-spoke CloudFormation (1 TGW, 6 TGW routes = 3 hub→spoke + 3 spoke→hub, 3 endpoints on the hub). Full ground suite: 0 failures.Remaining
Step 4 — compute-to-data egress per
DataEndpoint(the ground#10 routing). And the live numbered-deploy-phase wiring (dry-run only today) is still a follow-up.Refs: #11, #10.