-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
ConcurrentUpdateException for resource aws_appautoscaling_policy #17915
Comments
I'm seeing the same issue with concurrent creations of |
Running into the same issue that doesn't allow me to leverage
I'm currently going with the first workaround. As mentioned, though, this gets extremely messy as soon as you have more than 2-3 actions, since you have to maintain your own dependency chain. Implementing a lock at a Scheduled Action level, rather than for a given Scaling Target, should fix the issue. |
I'm facing the same issue in |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.14.7
Terraform aws provider plugin v3.30.0
Affected Resource(s)
Terraform Configuration Files
I have a Terraform code base which in parallel creates many
aws_appautoscaling_policy
resources. As by the nature of the code base (which invokes the count attribute making things optional), it is not possible to define dependencies for all of the resources as workaround.Expected Behavior
When creating multiple
aws_appautoscaling_policy
resources, the terraform apply call should not fail and in case it is observing aConcurrentUpdateException
a retry attempt should happen.Actual Behavior
When creating multiple
aws_appautoscaling_policy
resources, the terraform apply call may fail with errorReviewing the code in https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_appautoscaling_policy.go#L232 it seems there is already a retry attempt in case of a timeout. Maybe this can be enhanced the way that a retry also happens in case of a
ConcurrentUpdateException
.References
There is a blog post https://keita.blog/2018/01/29/aws-application-auto-scaling-for-ecs-with-terraform/ which describes a workaround for the issue but this is not really applicable and scaling and it is just a workaround.
The text was updated successfully, but these errors were encountered: