terraform-aws-vpc
terraform-aws-vpc copied to clipboard
Customize Private and Public Route Table
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
- No π: please wait to file a request until the functionality is avaialble in the AWS provider
Is your request related to a problem? Please describe.
When I create a VPC a need to add more routes in my route table so I can conncet to peering connections or to other services. I can't do this with this module.
Describe the solution you'd like.
There is already a code to do this with the default root table. It's necessary to replicate the same solution to others root tables.
Describe alternatives you've considered.
I have to create a new resourte aws_route just to add new routes to the recently created route tables
Additional context
I also recently ran into this limitation where I needed to update the route table for a VPC to VPC peering connection.
If the route tables where created without the inline route and instead used
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route
then this would be possible.
Per the documentation:
NOTE on Route Tables and Routes: Terraform currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules.
This PR is staled but it may be useful to someone?
https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/809
I hope I can move it forward shortly
The above change request didn't make it through review, unfortunately, Another way forward for Terragrunt users would be adding a terraform registry module for aws_route (where should I open a ticket for it, @antonbabenko ?). In Terraform one can just compose additional aws_route resources as needed, but not in terragrunt.hcl files, without such a module URI to refer.
Once there is an aws_route module in terraform registry terragrunt.hcl files could refer it via tfr transport, or a github (https transport) */modules/aws_route URI.
Until then, Fargate usecases in private EKS clusters remain blocked [0] for Terragrunt users as VPC peering looks the most promising way of accessing a private EKS cluster subnets from intranet VPCs, but there is no clear way to automate routes management for that with Terragrunt.
[0] See:
At this time, pods that are running on Fargate aren't assigned public IP addresses. Therefore, only private subnets with no direct route to an Internet Gateway are accepted for this parameter.
I workarounded this in my teks fork by using another module to manage VPC peering and custom routes
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
This issue was automatically closed because of stale in 10 days
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.