1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
ok. while formulating this question i stumbled upon a setting in our aws_ecs_capacity_provider: we have set managed_termination_protection to "ENABLED". According to the AWS docs, this only should be possible in case the protect_from_scale_in is enabled too. But we do not get an error (neither via AWS console nor via terraform apply), nor is the change of the protect_from_scale_in to false automatically disabling the managed_termination_protection. (!)
I have set the managed_termination_protection to "DISABLED" manually via AWS console and hope tomorrow our new EC2 instances will be launched with scale-in-protecion set to false.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a 7 mois
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
The requirement is one way. The protect_from_scale_in setting has to be enabled on the ASG for managed_termination_protection to be enabled in ECS; but AutoScaling isn't aware of the ECS capacity provider, and so it lets you turn the setting off on the ASG at any time.
With managed_termination_protection disabled, make sure you have a lifecycle hook on the ASG set to tell ECS to drain the running tasks before instance termination (or some other method to do the same thing). Example: https://aws.amazon.com/blogs/compute/how-to-automate-container-instance-draining-in-amazon-ecs/
Thank you Shahad_C. Just wanted to mention, that managed_termination_protection was the problem indeed. After disabling it, it works fine :)