Full Infrastructure-as-Code Migration Using Terraform for a Media Streaming Platform
Project Background
A media streaming company serving 2 million subscribers had grown its AWS footprint organically over three years entirely through the console. Every environment — dev, staging, production — was configured differently, secrets were embedded in EC2 user data scripts, and onboarding a new cloud engineer took three weeks just to document what existed.
The Challenge
We were engaged to discover, document, and systematically migrate the entire AWS estate — spanning 6 AWS accounts, 200+ resources, and 4 regions — into Terraform without disrupting a platform that streams live content 24/7. The client also needed a CI/CD pipeline for infrastructure changes so no engineer could ever apply Terraform directly from a laptop again.
What We Delivered
- Ran a full AWS inventory using Terraformer and custom Python tooling to generate baseline Terraform state across all accounts
- Designed a modular Terraform library covering VPC, ECS, RDS, CloudFront, WAF, Route 53, and S3 with sensible defaults and per-environment overrides
- Introduced Terraform Cloud workspaces with remote state, SSO-controlled access, and Sentinel policy enforcement for cost guardrails
- Built a GitOps flow: pull request triggers a
terraform planposted as a PR comment; merge triggersterraform applyvia a locked workspace - Migrated all 200+ resources into state with zero downtime using targeted imports and carefully sequenced apply runs
- Documented every module with README, input/output tables, and example usage so the in-house team could extend it independently
Technical Stack
IaC: Terraform 1.7 + Terraform Cloud · Policy: Sentinel · Discovery: Terraformer · CI/CD: GitHub Actions · Secrets: AWS Secrets Manager · Accounts: AWS Organizations + Control Tower
Outcomes
Provisioning a new environment dropped from a three-day manual process to a 30-minute automated run. Configuration drift incidents fell to zero in the six months post-migration. The team now ships infrastructure changes through pull requests with the same rigour as application code, and new engineers are productive in the cloud environment within two days of joining.
