Skip to content

Remove duplicate route from route table block to fix RouteAlreadyExists error

Davis Bickford requested to merge dbickford/route-table-bug into main

The following error has been occurring when deploying infra with GRIT:

│ Error: RouteAlreadyExists: Route in Route Table (rtb-080201ee17eb091f7) with destination (0.0.0.0/0) already exists
 
│   with module.vpc.module.vpc.aws_route.internet-route,
│   on ../.local/grit/modules/aws/vpc/internal/vpc.tf line 47, in resource "aws_route" "internet-route":
│   47: resource "aws_route" "internet-route" {

This MR fixes the issue by removing a route that was created inside the route table block, resulting in a duplicate route. I kept the separate route block and removed the embedded route so that our unit tests can still confirm accurately that the route itself has been created.

closes GRIT docker autoscaler example fails to create ... (#78) • Davis Bickford • 17.0

Merge request reports