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

resource/aws_route: aws_route does not respect a high create timeout and gives up always after 21 retries #21830

Closed
ialidzhikov opened this issue Nov 18, 2021 · 5 comments · Fixed by #21831
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@ialidzhikov
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

terraform version - 0.12.31
provider-aws version - 3.63.0

Affected Resource(s)

  • aws_route

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

provider "aws" {
  access_key = var.ACCESS_KEY_ID
  secret_key = var.SECRET_ACCESS_KEY
  region     = "eu-west-1"
}

resource "aws_vpc" "vpc" {
  cidr_block           = "10.222.0.0/16"
  enable_dns_support   = true
  enable_dns_hostnames = true
}

resource "aws_subnet" "public_utility_z0" {
  vpc_id            = aws_vpc.vpc.id
  cidr_block        = "10.222.96.0/26"
  availability_zone = "eu-west-1a"
}

resource "aws_eip" "eip_natgw_z0" {
  vpc = true
}

resource "aws_nat_gateway" "natgw_z0" {
  allocation_id = aws_eip.eip_natgw_z0.id
  subnet_id     = aws_subnet.public_utility_z0.id
}

resource "aws_route_table" "routetable_private_utility_z0" {
  vpc_id = aws_vpc.vpc.id
}

resource "aws_route" "private_utility_z0_nat" {
  route_table_id         = aws_route_table.routetable_private_utility_z0.id
  destination_cidr_block = "0.0.0.0/0"
  nat_gateway_id         = aws_nat_gateway.natgw_z0.id

  timeouts {
    create = "5m"
  }
}

Debug Output

Panic Output

Expected Behavior

aws_route to respect the configured timeout:

  timeouts {
    create = "5m"
  }

Actual Behavior

Route creation always times out after 21 retries (2m30s) and does not respect the configured create timeout:

terraform apply of the configuration from above potentially fails with:

aws_route.private_utility_z0_nat: Creating...
aws_route.private_utility_z0_nat: Still creating... [10s elapsed]
aws_route.private_utility_z0_nat: Still creating... [20s elapsed]
aws_route.private_utility_z0_nat: Still creating... [30s elapsed]
aws_route.private_utility_z0_nat: Still creating... [40s elapsed]
aws_route.private_utility_z0_nat: Still creating... [50s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m0s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m10s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m20s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m30s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m40s elapsed]
aws_route.private_utility_z0_nat: Still creating... [1m50s elapsed]
aws_route.private_utility_z0_nat: Still creating... [2m0s elapsed]
aws_route.private_utility_z0_nat: Still creating... [2m10s elapsed]
aws_route.private_utility_z0_nat: Still creating... [2m20s elapsed]
aws_route.private_utility_z0_nat: Still creating... [2m30s elapsed]

Error: error waiting for Route in Route Table (rtb-1234) with destination (0.0.0.0/0) to become available: couldn't find resource (21 retries)

  on tf/main.tf line 245, in resource "aws_route" "private_utility_z0_nat":
 245: resource "aws_route" "private_utility_z0_nat" {

Steps to Reproduce

See above.

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 18, 2021
@justinretzolk
Copy link
Member

Hey @ialidzhikov 👋 Thanks for taking the time to submit this issue. It looks like this is a duplicate of #21525. We like to try to keep discussions consolidated, so we’re going to close this new issue in favor of #21525.

@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Nov 18, 2021
@ialidzhikov
Copy link
Contributor Author

ialidzhikov commented Nov 18, 2021

I would say this issue is much more concrete one and much more precise one than #21525. #21525 lacks any details/logs/steps to reproduce. Closing issues in such way actually does not bring much value. I would appreciate if you can reopen this issue. Thanks in advance!
(I don't have rights to reopen this issue because maintainer closed my issue, that's why I am asking you to reopen).

@justinretzolk
Copy link
Member

Hey @ialidzhikov, I see where you're coming from in terms of this issue having more of a concrete example and steps to reproduce (and thank you very much for that). The reason behind us closing this one as the duplicate comes down to the fact that the linked issue already has quite a bit of conversation going, and quite a few "👍" reactions to it, which we use to help gauge community interest in a particular issue/PR.

We also like to keep conversations within a single issue where possible so that there is a single "point of truth" where our engineers can reference when looking into the issue (for what it's worth, the linked issue is already on our radar, which was another reason why I opted to keep that one open). I'm also happy to copy over your information into a comment on the linked issue so that the information is more readily retained without you needing to do so.

@github-actions
Copy link

This functionality has been released in v3.66.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. Thank you!

@github-actions
Copy link

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 May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants