Remove the risk from an ordinary route change
Our AWS networks were connected through a transit-gateway configuration built from about 15 copies of a community module. Routes were identified by their position in lists. Adding a network range could shift those positions and cause Terraform to propose replacing unrelated production routes.
That behavior made even small changes difficult to approve. I separated the work into two steps: stabilize Terraform’s representation of the existing network, then redesign how the network expressed connectivity.
Prove the refactor preserves live routing
I replaced the module copies with explicit resources and stable route identities. A change to one range could then be reviewed without unrelated routes moving because of list order.
The migration needed evidence before it touched the state. I mapped every old resource address to its new address and opened a demonstration pull request that could not be merged accidentally. Its plan showed no infrastructure changes after the state mapping. I documented rollback, landed the refactor, and removed the temporary demonstration code.
The no-op proof applied to this representation change. The subsequent Cloud WAN redesign was a separate architectural change.
Express connectivity as policy
I proposed AWS Cloud WAN, and the team adopted the design. We also evaluated a transit-gateway orchestration solution, but it would have left us operating more of the coordination machinery ourselves.
The Cloud WAN policy defines production, non-production, shared services, and quarantine. Production and non-production each exchange routes with shared services; quarantine shares no routes and isolates its attachments from one another.
Production and non-production are not directly shared with each other. Attachment rules check both the owning account and the requested segment tag; unmatched combinations fall through to quarantine. A tag alone is insufficient to grant connectivity.
This also changes regional expansion. The core network’s regions and segment rules are reviewed in the policy, and a new cell can request its attachment through Terraform.
What changed
The first step made an existing production network maintainable again, with a state migration demonstrated before it was applied. The Cloud WAN design gave the team an explicit, reviewable model for network membership and separation. These address different risks: unintended resource replacement during a refactor, and unintended connectivity as the platform grows.