-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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-provider: "The input token is no longer current." when operating on multiple WAF objects #10335
Comments
@optimisticanshul did you see this issue when you were testing? Paul |
Yep -- seeing the same thing. |
+1 still happening |
+1 also experiencing this issue with our environments. A 2nd apply seems to fix. |
+1 same here |
+1 on 0.8.8 |
@stack72 - Paul, it seems like this issue got lost -- would it be possible to assign someone on it. It's starting to gain a lot of traction, and the problem is very frustrating. |
+1 on Terraform v0.9.3 |
The bugfix was merged and it will be released in 0.9.4. Thanks for the patience. 😅 |
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. |
AWS WAF implements a token based system to ensure that no concurrent changes are applied on the WAF rules. The API expects the API client to take care of synchronisation.
If two or more threads/workers request a token at the same time, they might get the same token:
But only one can actually do one change, the token will be immediately marked as invalid, the other operations will fail with
The input token is no longer current.
This is happening with terraform when handling multiple AWS WAF resources.
Terraform Version
0.7.10
Affected Resource(s)
aws-provider.aws_waf_*
Terraform Configuration Files
Debug Output
If you run the above code, it will create only one resource each time. The same for destroy:
Expected Behavior
Should create/update/delete all the resources sequentially without failing.
Actual Behavior
Only one change at a time is possible. More might be possible if they happen to run sequentially.
Steps to Reproduce
terraform apply
Workaround
parallelism
to limit the number of concurrent changes to 1:terraform apply -parallelism=1
. But everything will be slower.References
How WAF token works: http://docs.aws.amazon.com/waf/latest/APIReference/API_GetChangeToken.html
The text was updated successfully, but these errors were encountered: