terraform-aws-named-subnets icon indicating copy to clipboard operation
terraform-aws-named-subnets copied to clipboard

add transit gateway id option to the route table

Open Hamza-Olol opened this issue 9 months ago • 0 comments

what

  • The existing module only allows a user to associate the route table of a private subnet with a network interface or a nat gateway.
  • By adding the tgw_id argument, users of the subnet module can automatically create a route table with routing between a private subnet and a transit gateway.

why

  • As a best practice, a user may create an AWS account for centralized networking.
  • To allow traffic to route from account B to account A (centralized networking account), a Transit Gateway is needed.
  • If a user creates a subnet using this module, the tgw_id feature will allow the user to directly associate the route table in the private subnet to an existing transit gateway.
  • Example architecture: ec2 -> private subnet rtb -> tgw -> private subnet rtb-> natgw -> public internet |--------AWS Account B------|-------AWS Account A----------|

References

Multi account practices

Hamza-Olol avatar May 13 '24 23:05 Hamza-Olol