0
votes

We are using terraform to schedule more containers to ECS cluster

The problem is that a new deployment (terraform apply) will make the scheduled containers to be terminated

i.e if we schedule more containers to 15 PM and scale down to 20 PM, if we run terraform apply at 16 PM - the containers launched at 15 PM will be terminated

any suggestions?

1
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform applyshakhawat

1 Answers

0
votes

We ended up scheduling the scale up action for every minute during that time

This means that if a new deployment is launched - it will be validated that the number of desired containers is right