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

aws_route: IPv6 Route: Error finding route after creating it #3422

Closed
benrobinsonsonos opened this issue Feb 16, 2018 · 10 comments · Fixed by #12890
Closed

aws_route: IPv6 Route: Error finding route after creating it #3422

benrobinsonsonos opened this issue Feb 16, 2018 · 10 comments · Fixed by #12890
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@benrobinsonsonos
Copy link

Terraform Version

terraform 0.11.3
terraform-provider-aws_v1.9.0_x4

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_route

Terraform Configuration Files

resource "aws_vpc" "vpc" {
  cidr_block = "10.0.0.0/16"
  assign_generated_ipv6_cidr_block = "true"
}

resource "aws_internet_gateway" "igw" {
  vpc_id = "${aws_vpc.vpc.id}"
}

resource "aws_subnet" "pub_sub_a" {
  vpc_id = "${aws_vpc.vpc.id}"
  cidr_block = "10.0.0.0/24"
  availability_zone = "us-east-1a"
}

resource "aws_route_table" "pub_rt" {
  vpc_id = "${aws_vpc.vpc.id}"
}

resource "aws_route_table_association" "pub_rta_a" {
  subnet_id = "${aws_subnet.pub_sub_a.id}"
  route_table_id = "${aws_route_table.pub_rt.id}"
}

resource "aws_route" "pub_rt_def" {
  route_table_id = "${aws_route_table.pub_rt.id}"
  destination_cidr_block = "0.0.0.0/0"
  gateway_id = "${aws_internet_gateway.igw.id}"
  depends_on = ["aws_internet_gateway.igw"]
}

resource "aws_route" "pub_rt_ipv6_def" {
  route_table_id = "${aws_route_table.pub_rt.id}"
  destination_ipv6_cidr_block = "::0/0"
  gateway_id = "${aws_internet_gateway.igw.id}"
  depends_on = ["aws_internet_gateway.igw"]
}

Expected Behavior

IPv6 route should be created and added to the state.

Actual Behavior

Terraform creates IPv6 route that is visible in management console, however, repeats, "Still creating..." until (2m0s elapsed), then returns an error that route couldn't be found after creating it. Repeating 'terraform apply' returns the same results.

  • aws_route.pub_rt_ipv6_def: Error finding route after creating it: Unable to find matching route for Route Table (rtb-123456) and destination IPv6 CIDR block (::0/0).

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Feb 21, 2018
@smihajlovic-frame
Copy link

@benrobinsonsonos do you have any updates on this? I have similar issues with ipv4 routes

@benrobinsonsonos
Copy link
Author

Same behavior observed in terraform-provider-aws_v1.10.0_x4. IPv4 route successfully created and added to the statefile. IPv6 route created, however, output reports "Error finding route after creating it."

@DrFaust92
Copy link
Collaborator

I was not able to reproduce this, is this still an issue?

@mmerickel
Copy link

I ran into this with a very similar setup. I think the issue is that AWS is canonicalizing the IPv6 route and terraform is not, so terraform is looking for ::0/0 and AWS made a route for ::/0 and terraform cannot find it after it was created.

@DrFaust92
Copy link
Collaborator

Can you share you're config so I'll try to reproduce?

@DrFaust92
Copy link
Collaborator

@mmerickel i've dived into the code a bit and it seems you are right

@DrFaust92
Copy link
Collaborator

opened #12890 to address this

@bflad bflad added this to the v2.59.0 milestone Apr 23, 2020
@bflad
Copy link
Contributor

bflad commented Apr 23, 2020

The fix for this has been merged and will release with version 2.59.0 of the Terraform AWS Provider, likely tomorrow. Thanks to @DrFaust92 for the implementation. 👍

@ghost
Copy link

ghost commented Apr 24, 2020

This has been released in version 2.59.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented May 23, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants