Cloud Dev Notes

infra diary / small notes / repeatable fixes

Why I Prefer Terraform Over CloudFormation

2026-01-28 ยท IaC

This is not a religious argument. CloudFormation works and is well integrated in AWS. I still reach for Terraform first because the authoring experience is better and multi-environment workflows are easier to keep consistent.

What I actually like

1) HCL is more readable than large YAML/JSON templates when the infrastructure grows beyond a few resources.

2) Modules and composition patterns feel natural, so the repo stays small even when the infra expands.

3) State is a liability if unmanaged, but it is also a useful source of truth when you treat it like data and keep it safe.

The best practice that matters: keep state remote, versioned, and locked, and keep your plans reviewable.