← Back to work

Infrastructure you can read, review & reproduce.

Reusable, version-controlled Terraform modules provisioning EC2, VPC, RDS, S3, and DynamoDB across environments, with Ansible handling everything inside the instances. New environments went from days of console clicking to minutes and a pull request.

Context

Emumba & client work, multi-environment AWS

Stack

Terraform · OpenTofu · Ansible · AWS

Year

2024

terraform plan PR review apply ansible-playbook verified environment

The mission

Every environment was a snowflake

Hand-built cloud environments are undocumented, unrepeatable, and impossible to review. Standing up a new one meant days in the AWS console and a fresh batch of subtle differences that surfaced later as production bugs.

I codified the entire AWS footprint as modular Terraform (networking, compute, databases, storage) so a complete, consistent environment became a pull request and an apply. Ansible playbooks take over from there, configuring instances idempotently with community-backed roles.

What I built

The work

Challenges

Problems along the way

Copy-pasted Terraform diverged

Early configurations were duplicated between projects, so fixes never propagated.

Fixed: shared modules behind versioned interfaces, so one fix reaches every environment on the next apply.

State conflicts between engineers

Local state files led to overwritten resources and "who changed this?" mysteries.

Fixed: a remote backend with state locking and per-environment workspaces, making concurrent work safe and auditable.

Created ≠ ready

Terraform produced the instances, but packages, users, and services were still configured by hand.

Fixed: Ansible playbooks run post-provision against inventory generated from Terraform outputs, closing the gap between "created" and "ready".

Outcome

100%

of infrastructure under version control

5+

AWS services fully modularized

Minutes

to provision a new environment

Zero

console click-ops in the workflow

← Back to work Next: High-availability AWS