codequest-eu / terraform-modules

Terraform modules commonly used in our projects
5 stars 4 forks source link

feat: ecs/run_task module for running one-off tasks #156

Closed mskrajnowski closed 11 months ago

mskrajnowski commented 11 months ago

Added ecs/run_task module for running one-off tasks during deployment.

Under the hood uses a null_resource with local-exec provisioner to run a bash script which:

  1. schedules the task
  2. waits for it to stop
  3. checks if there were any issues, e.g. the task wasn't started or exited with a non-zero code
  4. prints the logs
  5. exits with the container's exit code or 1 if something else failed