terraform-aws-vpc icon indicating copy to clipboard operation
terraform-aws-vpc copied to clipboard

Customize Private and Public Route Table

Open cabewill opened this issue 3 years ago β€’ 5 comments

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

cabewill avatar Aug 03 '22 17:08 cabewill

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.

pickgr avatar Sep 01 '22 00:09 pickgr

This PR is staled but it may be useful to someone?

https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/809

samsen1 avatar Sep 07 '22 17:09 samsen1

I hope I can move it forward shortly

bogdando avatar Sep 27 '22 08:09 bogdando

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.

bogdando avatar Sep 28 '22 06:09 bogdando

I workarounded this in my teks fork by using another module to manage VPC peering and custom routes

bogdando avatar Sep 28 '22 11:09 bogdando

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] avatar Oct 29 '22 00:10 github-actions[bot]

This issue was automatically closed because of stale in 10 days

github-actions[bot] avatar Nov 08 '22 00:11 github-actions[bot]

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.

github-actions[bot] avatar Dec 08 '22 02:12 github-actions[bot]