What the Terraform recording shows for Expense Tracker
The console VPC and the Terraform files visible in the repository recording.
The Trigger & Underlying Problem
The Trigger: Manual console provisioning caused configuration drift between development and testing setups.
The Core Problem: When infrastructure is provisioned by clicking in the AWS web console, nobody knows why a security group was opened or why a subnet was resized. Manual mistakes are inevitable and disaster recovery is impossible.
Why Standard Solutions Were Insufficient: Terraform is the industry standard for declarative infrastructure management across cloud providers.
What It Solves in Practice
Transforms infrastructure into version-controlled, reproducible code that can be planned, reviewed in pull requests, and applied deterministically.
Guarantees consistent environments and documents the exact state of infrastructure in Git.
Infrastructure was manually configured with notes in text files.
Architecture & Key Engineering Decisions
The Ansible recording shows a terraform directory with vpc.tf, alb.tf, ec2.tf, rds.tf, s3.tf, iam.tf, ecr.tf, api_gateway.tf, and lambda.tf. The console recording shows the VPC those files produced. A remote state backend is not on screen.
- Kept network, compute, database, and storage in separate Terraform files rather than one scratch file.
- The visible rds.tf sets the database to PostgreSQL 17, db.t3.micro, not publicly accessible, and storage encrypted.
- I am not describing a DynamoDB lock table. The recordings do not show one.
# The Expense Tracker recordings show Terraform files and the # resulting VPC in the AWS console. They do not show a remote # state backend block. No bucket name or lock table is claimed here.
What Failed in Practice & How It Was Addressed
- Nothing in the Terraform or console recording shows a failed apply, a state lock, or a drift incident. I am not adding one.
- No fix is claimed here. The useful evidence is the console resource map matching the subnet and gateway names, and rds.tf matching the database drawn as not public.
Takeaways & Future Iterations
- The file tree and the console need to be read together. A diagram title is not the same thing as the resource map.
- Remote state locking is a separate topic. It is not demonstrated in these recordings.
I would add a remote state backend only after I can show the bucket and the lock table. I am not claiming that setup today.