Docker Deployments using Terraform
https://medium.com/build-acl/docker-deployments-using-terraform-d2bf36ec7bdf
It’s easy to understand how to use Terraform to set up a container orchestration platform, such as AWS Elastic Container Service (ECS). You basically read the documentation, figure out the pieces involved, and put them together like LEGO.
What’s unclear though is how to deploy updated Docker images for your services once set up, particularly stateful services that manage their own schema. Furthermore, how can you do that as part of a Continuous Delivery (CD) pipeline? For example, in the pipeline below, how can we use Terraform in the Deploy step to deploy the latest Docker image built in the Build step, with zero-downtime, in an automated fashion, even if the new image requires a schema update? That part is not so clear.