Infrastructure as Code
Modular Terraform stacks managing infrastructure across multiple environments and regions.
Overview
Infrastructure for a multi-region SaaS product was managed through a mix of console click-ops and ad-hoc scripts. No two environments were truly identical, drift was constant, and disaster recovery had never actually been tested because nobody trusted it would work.
The Challenge
Staging and production had diverged silently over 18 months. A 'simple' infra change took days because nobody was confident what would break. There was no tested DR plan — an entire AWS region failure would have meant unknown, possibly unrecoverable downtime.
Approach
- Re-architected infrastructure into versioned, composable Terraform modules — networking, compute, data, and security as independent, reusable layers
- Implemented remote state with S3 + DynamoDB locking, and mandatory plan review in pull requests before any apply
- Built drift detection running nightly, alerting when live infrastructure diverges from code
- Designed and tested an active-passive multi-region failover architecture with documented, automated RTO/RPO targets
- Migrated all remaining manually-created resources into Terraform state via systematic import
Technology Stack
Results — Before vs. After
Environment provisioning time
Infrastructure drift incidents/month
Disaster recovery time (tested)
Unmanaged ('click-ops') resources
Outcome
Every environment is now reproducible from code in under 15 minutes. Drift incidents dropped from biweekly to almost never. The disaster recovery plan went from theoretical to tested — failover now completes in 22 minutes with confidence.
Facing a similar challenge in your organisation?
I work with engineering teams and businesses to design, build, and modernise cloud platforms — backed by a network of trusted specialists for execution at any scale.
Get In Touch