08/18/2022, 8:24 AM
Hello, according to the ec2.RouteTable documentation:
NOTE on Route Tables and Routes: This provider 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.
But importing ec2.RouteTable resources automatically attach the Routes as inline. Does it mean that I can not create more individual routes using ec2.Route because then it will override the ones already imported on the ec2.RouteTable (because those are inline)?.


08/19/2022, 12:03 AM
you should be able to attach the route, let me know what you try and find


08/23/2022, 8:58 AM
Seems to be working without issues. I imported the route tables and it came with inline routes. Then I created an individual route to replace one of the imported inline and it worked. Also I imported a single route , destroy it, recreate it and so far so good. So the conclusion is: I can create additional routes with the ec2.Route constructor and attach them to the imported route table without issues. If the route table has the same destination then it will overrride that route. If the route was imported into the route table individually then it will be updated as well.