DCX Technology RadarDCX Technology Radar

Terraform

devops
This item was not updated in last three versions of the Radar. Should it have appeared in one of the more recent editions, there is a good chance it remains pertinent. However, if the item dates back further, its relevance may have diminished and our current evaluation could vary. Regrettably, our capacity to consistently revisit items from past Radar editions is limited.
Adopt

Terraform is a tool for building, changing and versioning infrastructure using the infrastructure as code pattern. Terraform supports popular service providers like AWS, Google Cloud Platform, Azure and many more.

Infrastructure is described in configuration files through the HCL (HashiCorp Configuration Language), which brings a set of string interpolations and built-in functions, including conditionals and loops. Terraform validates configuration files before trying to run updates. It checks not only that all files use the correct syntax, but also that all parameters are accessible and the configuration as a whole is valid. In Terraform, you can (and should) run a ‘plan’ step before applying any changes. This step tells you precisely what is going to change and why. Another feature of Terraform is that it makes it easy to reuse code by using modules. That gives a lot of leeway in structuring projects in the way it makes most sense.

Here at DCX we use terraform in multiple teams to provision infrastructure and manage their lifecycle on cloud platforms such as AWS and for platforms such as Kubernetes.

Trial

For the infrastructure of our OM3 projects we run multiple Kubernetes clusters, and to orchestrate the infrastructure provisioning we quickly decided to go with Terraform. Terraform allows us to easily manage our infrastructure, from AWS EC2 instances to RabbitMQ message queues. Also, the Kops installer for Kubernetes on AWS uses Terraform as its main building brick, and we can trigger Kops via Terraform.

We bring terraform together with Helm to manage similar parts of the infrastructure, for example a shared file with domain name to application mappings allows us to provision Route 53 DNS entries via Terraform and then roll out Kubernetes Ingress definitions with the appropriate hostname to service mapping via Helm.