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_ec2_client_vpn_authorization_rule timeout after 1m0s #14156

Closed
connor-tyndall opened this issue Jul 13, 2020 · 8 comments · Fixed by #15037
Closed

aws_ec2_client_vpn_authorization_rule timeout after 1m0s #14156

connor-tyndall opened this issue Jul 13, 2020 · 8 comments · Fixed by #15037
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@connor-tyndall
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 Version

v0.12.24

Affected Resource(s)

  • aws_ec2_client_vpn_authorization_rule

Terraform Configuration Files

resource "aws_ec2_client_vpn_authorization_rule" "custom" {
  for_each               = var.use_default_authZ_rules ? {} : var.authorization_rules
  client_vpn_endpoint_id = aws_cloudformation_stack.client_vpn.outputs["clientVpnId"]
  target_network_cidr    = each.value.cidr
  access_group_id        = each.value.ad_group_id
}

Expected Behavior

The Terraform resource should include a timeouts argument or wait until the authorization rule moves to an "Active" state.

Actual Behavior

Error: error waiting for Client VPN authorization rule to be active: timeout while waiting for state to become 'active' (last state: 'authorizing', timeout: 1m0s)

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jul 13, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 13, 2020
@connor-tyndall
Copy link
Contributor Author

@gdavison

@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 13, 2020
@connor-tyndall
Copy link
Contributor Author

Also, when modifying an existing authorization rule, the resource times out as well... which requires a manual deletion and reapply.

Error: error revoking Client VPN authorization rule: timeout while waiting for resource to be gone (last state: 'revoking', timeout: 1m0s)

@nijave
Copy link
Contributor

nijave commented Aug 20, 2020

Yup, seems like the timeouts are set too aggressively https://github.com/terraform-providers/terraform-provider-aws/pull/13950/files#diff-b2b7576ebf9812ff7aa5592444112309R76

If you hit this on create you can just wait a couple minutes then run again and use the failure message to import, easily

Acquiring state lock. This may take a few moments...
aws_ec2_client_vpn_authorization_rule.rules["10.15.64.0/20"]: Creating...

...

Error: error creating Client VPN authorization rule "cvpn-endpoint-02c5d0a60a,10.15.64.0/20": InvalidClientVpnDuplicateAuthorizationRule: Rule already exists
        status code: 400, request id: 8cfe6767-fb69-4e21-8c72-ed94db76b16b
terraform import 'aws_ec2_client_vpn_authorization_rule.rules["10.15.64.0/20"]' cvpn-endpoint-02c5d0a60a,10.15.64.0/20

@connor-tyndall
Copy link
Contributor Author

@gdavison @bflad Any update on this? About 20% of authorization rules we create hit the 1 minute timeout. Can this be updated ASAP?

@ChristophShyper
Copy link
Contributor

That would be very helpful. Cannot use this resource in automation, it fails always, just by few seconds.

@bflad
Copy link
Contributor

bflad commented Sep 8, 2020

The fix for this has been merged and will release with version 3.6.0 of the Terraform AWS Provider, later this week. Thanks to @connor-tyndall for the implementation. 👍

@bflad bflad added bug Addresses a defect in current functionality. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Sep 8, 2020
@bflad bflad added this to the v3.6.0 milestone Sep 8, 2020
@ghost
Copy link

ghost commented Sep 11, 2020

This has been released in version 3.6.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 Oct 8, 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 as resolved and limited conversation to collaborators Oct 8, 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
5 participants