Immutable Infrastructure

Terraform works best if you adapt Immutable Infrastructure principles. It also can work pretty well if you use containers. Read Rebuilding our infrastructure (https://segment.com/blog/rebuilding-our-infrastructure/) from Segment about how they used Terraform with AWS Elastic Container Service and Docker for the new version of their infrastructure. It has good examples on Continuous Integration part as well.

The ECS plus Terraform approach seems to gain higher adoption in general; for example, check out presentation about more or less the same idea by Yevgeniy Brikman, named Infrastructure as Code: Running microservices on AWS with Docker, Terraform, and ECS (http://www.ybrikman.com/writing/2016/03/31/infrastructure-as-code-microservices-aws-docker-terraform-ecs/ ...

Get Getting Started with Terraform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.