terraform-aws-modules / terraform-aws-vpc

Terraform module to create AWS VPC resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws
Apache License 2.0
2.97k stars 4.42k forks source link

VPC and Transit Gateway #1094

Closed aleksandarzagorac closed 2 months ago

aleksandarzagorac commented 3 months ago

I would like to use this VPC module in combination with the transit gateway module (https://registry.terraform.io/modules/terraform-aws-modules/transit-gateway/aws/latest) in a way to route traffic from the private subsets (only) to the transit gateway. I did not find a solution since I can not manage the route tables for private subnets, nor can I add a new route table. Is there a way to perform this action? Even if there is a way to modify the route tables I would get a circular dependency between the vpc module and transit gateway module since the transit gateway attachments need the ids of the private subnets and the route table of the VPC would need the transit gateway ID.

derekmckinnon commented 3 months ago

This module outputs private_route_table_ids which you can use in conjunction with aws_route resources that you create yourself. You don't need to specify the attachment ID, you just need to specify the transit_gateway_id. In my configuration, I deployed the TGW ENIs into a different set of private subnets, but I don't know if that is a strict requirement.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 2 months ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 4 weeks ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.