A Month of Terraform

By: Jeremy W. Sherman. Published: . Categories: experience-report. Tags: terraform aws cloud.

I took Heroku for granted, and a month into setting up my own infra, I now know how much it bought me.

A lot of my past work has been infrastructure-adjacent. I often find myself filling in the Build & Integration role - the person that gets continuous integration off the ground and keeps it actually continuing rather than falling flat on its face. But often I’ve just been building one of a constellation of services, so the core infrastructure was already there, or I’ve been targeting something like Heroku, where you basically pick your poison, git push, and bob’s your uncle.

This time, I’m putting the pieces together using the AWS toolkit. And to smoosh them all together, I’m using Terraform, because heck if I’m going to be hand-writing YAML or JSON and praying it’s formatted right. Plus there’s more I want to orchestrate than just AWS, like, say, GitLab.

I don’t wanna talk about AWS just now. It reminds me of learning Foundation & Cocoa - you look at one piece, and it can do so much, and then you gotta put all those individually deep & complex pieces together to do more stuff. I figure if I put in the hours reading docs, learning what’s all there, and getting stabbed by the pointy bits, it’ll probably all come out fine in the end.

So, Terraform.

The Good

The Not So Good

The Different

Summary

I expect I’ll get used to most of the rough edges of the syntax in another month. And Terraform is still v0, so hey, maybe some breaking changes will clear all this mess away. 🤞

I’m intentionally not getting sucked into hacking around the docs frustrations just now. Or even the very tempting open issue about silencing all the Terragrunt logspew.

I do plan to spend a bit of time trying to get autocomplete working for resource and data source types and their arguments/attributes from the language server, at least. That would be a huge help.

It still feels like magic to run a command and have infrastructure just…happen. You hit return, wait a bit, and suddenly servers are serving and domains are aliasing and a whole constellation of systems are interoperating. It kinda reminds me of the magic of home automation with blinkenlights, only without any of that messy “hardware” stuff to break on you.