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

RouteAlreadyExists error #108

Closed
szinck1 opened this issue Mar 23, 2018 · 5 comments
Closed

RouteAlreadyExists error #108

szinck1 opened this issue Mar 23, 2018 · 5 comments

Comments

@szinck1
Copy link

szinck1 commented Mar 23, 2018

I'm running into the same(?) error as issue #44.

$ terraform version
Terraform v0.11.5

  • provider.aws v1.11.0

I successfully ran the same code in a different Region and AZ's previous to this execution...

My code:

module "vpc" {
  source = "terraform-aws-modules/vpc/aws"

  name = "Staging VPC US-EAST"
  cidr = "10.0.0.0/16"


 azs             = ["us-east-1a", "us-east-1b", "us-east-1c" ]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

  enable_nat_gateway = true
  enable_vpn_gateway = true

  tags = {
    Terraform = "True"
    Environment = "Staging"
  }
}

If I run it, everything looks good until:

* module.vpc.aws_route.private_nat_gateway[2]: 1 error(s) occurred:

* aws_route.private_nat_gateway.2: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: 879d33bf-6804-4e74-94a2-7a1e7c3c3040
* module.vpc.aws_route.private_nat_gateway[1]: 1 error(s) occurred:

* aws_route.private_nat_gateway.1: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: aa381109-6e9d-4902-9c3c-36f25a80de9e
* module.vpc.aws_route.private_nat_gateway[0]: 1 error(s) occurred:

* aws_route.private_nat_gateway.0: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: 50f82579-0fbb-4ff6-9831-352f00a3bb54
@szinck1
Copy link
Author

szinck1 commented Mar 23, 2018

It worked after I deleted the default VPC. But why would that cause an issue? They're on different IP networks. Also, the same code worked in ca-central-1 and the default VPC still exists.

@horsey
Copy link

horsey commented Mar 29, 2018

@szinck1 The issue in #44 seems to be a corner case that was fixed by @antonbabenko. However, I am still seeing this issue intermittently. I do not think it's related to the default VPC because I see the error even after the default VPC is deleted.

@antonbabenko
Copy link
Member

@horsey Could you please share your Terraform configurations in this PR? Maybe there is something wrong with it?

@antonbabenko
Copy link
Member

Thanks, everyone for reporting this issue. I am quite certain that this issue is now fixed in #111 and v1.27.0 has been released.

Please give it a try and leave a comment if the problem still exists.

@github-actions
Copy link

github-actions bot commented Nov 5, 2022

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 github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants