-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add longer timeouts to aws_ec2_client_vpn_route #40
Conversation
Default timeout for `aws_ec2_client_vpn_route` is 1 minute for all operations. Trying to attach routes in `eu-central-1` for a peered VPC, it constantly fails with: ``` │ Error: error waiting for EC2 Client VPN Route (cvpn-endpoint-xxx,subnet-yyy,10.100.0.0/16) create: timeout while waiting for state to become 'active' (last state: 'creating', timeout: 1m0s) │ │ with module.ec2_client_vpn[0].aws_ec2_client_vpn_route.default[0], │ on .terraform/modules/ec2_client_vpn/main.tf line 242, in resource "aws_ec2_client_vpn_route" "default": │ 242: resource "aws_ec2_client_vpn_route" "default" { ``` and ``` │ Error: error waiting for EC2 Client VPN Route (cvpn-endpoint-xxx,subnet-yyy,10.100.0.0/16) delete: timeout while waiting for resource to be gone (last state: 'deleting', timeout: 1m0s) ``` With this commit, we increment the timeout to 5 minutes. In my experiments, the route is always available in around 90 seconds. 5 minutes gives us plenty of time, and still is not too long to wait in case of problems. Upstream issue: hashicorp/terraform-provider-aws#23787 I think fixing here is good, until we wait for an upstream improvement, because I am currently blocked
/cc @Gowiem (sorry for the direct ping, but this is currently a blocker for me) |
/test all |
main.tf
Outdated
|
||
timeouts { | ||
create = "5m" | ||
update = "5m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rpadovani it looks like update
is not a timeouts
config option on this resource. Please remove this single line and I'll re-run tests + review.
See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_client_vpn_route#timeouts for full info on the timeouts configuration for this resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 thanks for properly reviewing this @Gowiem, I added it without double-checking, I am sorry. Fixed.
There isn't such a timeout, remove it.
This Pull Request has been updated, so we're dismissing all reviews.
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rpadovani All good -- Happens to the best of us!
Before we merge this, can you triple confirm that adding timeouts
in your own usage doesn't cause a rebuild of the resource or anything similar? It is a backwards compatible change? My assumption is yes, but I haven't added timeouts
to a resource yet surprisingly so I'm not 100%.
@Gowiem, I don't have a stable state, all my 3 routes are tainted, so I tested in this way:
So, it seems to want to replace only the tainted routes, not the 3rd one I imported. I would say we are safe :-) |
@rpadovani Thanks for the contribution! Released as https://github.com/cloudposse/terraform-aws-ec2-client-vpn/releases/tag/0.12.0 |
Default timeout for
aws_ec2_client_vpn_route
is 1 minute for all operations.Trying to attach routes in
eu-central-1
for a peered VPC, it constantly fails with:and
With this commit, we increment the timeout to 5 minutes. In my experiments, the route is always available in around 90 seconds. 5 minutes gives us plenty of time, and still is not too long to wait in case of problems.
Upstream issue: hashicorp/terraform-provider-aws#23787
I think fixing here is good, until we wait for an upstream improvement, because I am currently blocked
what
aws_ec2_client_vpn_route
why
references