Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create more than one route to route table #6305

Closed
kunalvudathu opened this issue May 9, 2023 · 2 comments
Closed

Can't create more than one route to route table #6305

kunalvudathu opened this issue May 9, 2023 · 2 comments
Labels
debugging Working with user to figure out if there is an issue

Comments

@kunalvudathu
Copy link

kunalvudathu commented May 9, 2023

This is the snippet of the code I used:

mock_rtb_private_1_id = ec2.create_route_table(VpcId=mock_vpc_id)['RouteTable']['RouteTableId']
ec2.create_route(DestinationCidrBlock="10.0.0.8/8", NatGatewayId=mock_igw_id,
                     RouteTableId=mock_rtb_private_1_id)
ec2.create_route(DestinationCidrBlock="0.0.0.0/0", NatGatewayId=mock_nat_1['NatGatewayId'],
                     RouteTableId=mock_rtb_private_1_id)

I get the following error when I try to create the second route (line 3):

botocore.exceptions.ClientError: An error occurred (RouteAlreadyExists) when calling the CreateRoute operation: The route identified by 0.0.0.0/0 already exists

Thank you so much!

@bblommers
Copy link
Collaborator

Hi @kunalvudathu, which version of Moto are you using? Because this looks very similar to #6096 (fixed as of moto >= 4.1.6.dev17)

@bblommers bblommers added the debugging Working with user to figure out if there is an issue label May 10, 2023
@kunalvudathu
Copy link
Author

Hi @kunalvudathu, which version of Moto are you using? Because this looks very similar to #6096 (fixed as of moto >= 4.1.6.dev17)

I was using 4.1.3, it works now! Thank you! Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging Working with user to figure out if there is an issue
Projects
None yet
Development

No branches or pull requests

2 participants