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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
When linking capacity provider to an ASG, a scaling policy is not created #12534
Comments
Any suggestions for this one? |
A workaround is to create it yourself. Here's my example:
This does seem to make scaling out work, but scaling in still isn't working for me (possibly due to #12582). |
Any love for this one? |
also interested in a solution to this, I created the policy but scale-in doesn't work as @peter-boekelheide-ah mentioned. I do see the edit: disabling scale-in protection on the instances makes them get terminated, but that isn't compatible with the capacity provider... |
i think in some situations it is creating the scaling policy. i was setting up a private module and had added an after i was happy with the setup from creating the module i used it again for another one and this time i do have a scaling policy attached to the ASG with a name of in the module i ended up with the capacity provider depending on the asg so maybe the asg needs to be created before the capacity provider for the managed scaling policy to be created. note that the managed scaling policy does not appear to be tracked in the terraform state. i've also (unsuccessfully) been trying to get the managed policy re-generated on my original setup - so far turning managed scaling off and back on for the capacity provider hasn't done it, and i'll need to update the running services to try deleting and recreating the capacity provider itself. edit: deleting the capacity provider from the cluster and re-adding it via the web ui does create the managed scaling policy in the existing ASG, and updating the capacity provider managed_scaling will update the managed scaling policy (that is not tracked by terraform). trying to re-add the capacity provider via terraform creates it, however it does not 'register' with the cluster or create the scaling policy. |
I'm running into this issue. Is there going to be a fix for this? |
Community Note
Terraform Version
Terraform v0.12.21
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
When manually creating a capacity provider and linking it to the ASG, a scaling policy is created:
Policy type:
Target Tracking scaling
Execute policy when:
As required to maintain metric CapacityProviderReservation (namespace: AWS/ECS/ManagedScaling, dimensions: CapacityProviderName = test,ClusterName = test, statistic: Average, unit: ) at 100
Take the action:
Add or remove instances as required
Instances need:
300
seconds to warm up after scaling
Disable scale-in:
No
Actual Behavior
Scaling policy is empty and is not scaling out because of that when running a task
Steps to Reproduce
auto_scaling_group_provider {
auto_scaling_group_arn = aws_autoscaling_group.bender_64_asg.arn
managed_termination_protection = "ENABLED"
}
Important Factoids
References
The text was updated successfully, but these errors were encountered: