VPC construct should allow using custom route table for many subnets
See original GitHub issueCurrently it’s not possible to specify either the number of route tables or inject a custom route table to the VPC construct.
Use Case
When creating VPN or Peering connections together with the VPC it would be great when I can customise the route table. For me there is no drawback having only one for many subnets - it’s less complex when modifying it.
Proposed Solution
Make it possible to set the route table per subnet. Currently it’s readonly. Why?
const privateRouteTable = new CfnRouteTable(this, "privateRouteTable", {
vpcId: vpc.vpcId
})
const selection = vpc.selectSubnets({
subnetType: ec2.SubnetType.PRIVATE
});
for (const subnet of selection.subnets) {
subnet.routeTable = privateRouteTable
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Configure route tables - Amazon Virtual Private Cloud
Each subnet in your VPC must be associated with a route table. A subnet can be explicitly associated with custom route table, or...
Read more >AWS — VPC Route Table Overview - Medium
A subnet can be explicitly associated with custom route table. Main route table automatically comes with VPC. It controls the routing for all...
Read more >Terraform Tutorial - VPC, Subnets, RouteTable, ELB, Security ...
Here are the files we need to create. ... The route tables associated with our public subnet (including custom ... Let's see what...
Read more >How to Build AWS VPC using Terraform - Step by Step
Routes in the route tables drive the decision to enable or disable internet access. When a subnet is associated with a route table...
Read more >Routes | VPC - Google Cloud
For custom subnets and custom mode VPC networks, you'll need to create your own ingress allow firewall rules. Static routes. Static routes are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just had to use:
To get rid of the autogenerated route tables in my project. They caused problems in replicating an existing VPC configuration to a new deployment of a project. More specifically they caused problems with VPC S3 Endpoint routing.
I second this use case. It would be nice to manage the route tables in VPC construct. Currently it’s hard to get a list of created route tables.