We have created a ECS cluster with Fargate and have created few tasks in service to be used in a CI/CD pipeline. Service has desired count of 1. So if we terminate any task, new task comes up automatically. Is there a way in which we can make sure that task completes and terminates? And when it does, service also should get terminated. We basically want to spin up one task for every stage of our pipeline and delete that task and service once the pipeline stage is completed. Is there any CLI commands that we can use for this case?
0 Answers