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

How to: configure timeouts for vpc module on aws_default_route_table #708

Closed
cdancy opened this issue Nov 9, 2021 · 10 comments
Closed

How to: configure timeouts for vpc module on aws_default_route_table #708

cdancy opened this issue Nov 9, 2021 · 10 comments

Comments

@cdancy
Copy link

cdancy commented Nov 9, 2021

Our vpc module seems to intermittently throw the below:

CREATE_FAILED : "terraform apply -auto-approve -no-color -input=false plan.json" command failed with code 1
        	            	
Error: error waiting for Route in Route Table (rtb-0179f2b9c38f21dd0) with destination (0.0.0.0/0) to become available: timeout while waiting for state to become 'ready' (timeout: 2m0s)

  with module.vpc.aws_route.private_nat_gateway[2],
  on .terraform/modules/vpc/main.tf line 1110, in resource "aws_route" "private_nat_gateway":
1110: resource "aws_route" "private_nat_gateway" {


Error: error reading Route Table Association (rtbassoc-00100b66ae8b7577e): Empty result

  with module.vpc.aws_route_table_association.public[0],
  on .terraform/modules/vpc/main.tf line 1204, in resource "aws_route_table_association" "public":
1204: resource "aws_route_table_association" "public" {

the default timeout of 2m is simply not enough for us and we'd like to increase it. Our vpc module is pretty basic and we don't attempt to do any additional configuration on the default route table (which is where I assume the above is coming from). I attempted to configure it like so:

resource "aws_default_route_table" "rtb-default" {
  default_route_table_id = module.vpc.default_vpc_main_route_table_id
  timeouts {
    create = "30m"
    update = "30m"
  }
}

But that then throws an exception saying:

1 validation error detected: Value '201-us-399200-rt-timeouts-2021110916415210_sgtnf-test-k8s-access-20211109165356' at 'functionName' failed to satisfy constraint: Member must have length less than or equal to 64

Not exactly sure how to move forward here. We just want to increase that default 2m timeout. Any suggestions?

@msharma24
Copy link
Contributor

Hi @cdancy

What version of this module are you using? The default route table time-out was updated in v3.9.0

@cdancy
Copy link
Author

cdancy commented Nov 9, 2021

@msharma24 interesting ... I'm on version 3.6.0. I see it's bumped to 5m now. I'll try doing that. Still ... is there a sane way to configure this for future use-cases should that not be enough?

@msharma24
Copy link
Contributor

I reckon updating the module version will fix your issue today. 5m time-out should not cause any more issues in the future too.

@cdancy
Copy link
Author

cdancy commented Nov 9, 2021

@msharma24 fair enough and I'll give that a go. Thanks for the pointer.

@cdancy
Copy link
Author

cdancy commented Nov 9, 2021

@msharma24 so that worked, and things got farther, but now I'm hitting the below:

Error: error reading Route Table Association (rtbassoc-0b3f1e625ea7d6978): empty result

 with module.vpc.aws_route_table_association.public[2],
 on .terraform/modules/vpc/main.tf line 1217, in resource "aws_route_table_association" "public":
1217: resource "aws_route_table_association" "public" {

@dhohengassner
Copy link

@cdancy Thanks for bringing that up!
Seeing the same error but not consistent.

Using version 3.10.0:

module.vpc.aws_route.private_nat_gateway[0]: Creation complete after 1s [id=r-rtb-0222974c8355a52aa1040279494]
╷
│ Error: error reading Route Table Association (rtbassoc-05f561a5ffebba79b): empty result
│ 
│   with module.vpc.aws_route_table_association.private[0],
│   on .terraform/modules/vpc/main.tf line 1147, in resource "aws_route_table_association" "private":
│ 1147: resource "aws_route_table_association" "private" {
│ 
╵

Any ideas or fix is much appreciated!

@cdancy
Copy link
Author

cdancy commented Nov 12, 2021

Fix might be handled by this PR hashicorp/terraform-provider-aws#21683

@Clee681
Copy link

Clee681 commented Dec 22, 2021

Using version 3.11.0

Error: error waiting for Route in Route Table (rtb-0cd2e0f77c17fb17a) with destination (0.0.0.0/0) to become available: couldn't find resource (21 retries)
with module.vpc.aws_route.private_nat_gateway[0]

@bryantbiggs
Copy link
Member

closing for now, can be tracked at referenced upstream issue hashicorp/terraform-provider-aws#21683

@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 Oct 30, 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

5 participants