DEV Community

motion team for Motion

Posted on

We Replaced 5 Years of Infrastructure Debt with TypeScript. Here's How.

Five years of different people clicking buttons in dashboards. Zero documentation. Pure tribal knowledge that walked out the door when people left.
Every deployment felt like Russian roulette because our setup was essentially unreproducible.


The Question That Changed Everything πŸ’‘

Sebastian joined our team and asked one simple question:

"What happens if we need to rebuild this from scratch?"

The honest answer was terrifying. We couldn't. Nobody could.


The Infrastructure Horror Story We All Know Too Well

Our Reality Check:
- 5 years of "it works, don't touch it"
- 0 documentation
- 100% tribal knowledge
- Every deploy = prayer circle
- New engineers = 3 months to understand anything
Enter fullscreen mode Exit fullscreen mode

Sound familiar? Yeah, we thought so.


One Engineer. One Mission. Zero Terraform Patches.

While most would try to document the mess or patch the existing Terraform, Sebastian made a bold call:

Rebuild everything using Pulumi + TypeScript.


Why?

  • Same language across our entire stack
  • Proper modular design
  • Type safety for infrastructure
  • Actual documentation that updates with code

The Transformation πŸš€

// Before: Nobody knows what this does
resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
  # ... 500 more lines of mystery
}
Enter fullscreen mode Exit fullscreen mode
// After: Self-documenting infrastructure
const webServer = new aws.ec2.Instance("web-server", {
  instanceType: aws.ec2.InstanceType.T3_Micro,
  ami: ubuntu20.then(ami => ami.id),
  userData: renderStartupScript(),
  tags: { 
    Purpose: "Handles API traffic",
    Owner: "platform-team" 
  }
});
Enter fullscreen mode Exit fullscreen mode

The Results After One Year

  • From 3 months β†’ 1 week for new engineers to understand our infra
  • From "prayer deploys" β†’ 30-minute production deployments**
  • From 0 β†’ 100% infrastructure reproducibility -** From tribal knowledge β†’ living documentation**

Any developer on our team can now understand, modify, and deploy our infrastructure.


This Is How We Think at Motion

Sebastian didn't wait for permission. He didn't form a committee. He saw a critical problem and owned the solution completely.
This is the engineering culture we're building at Motion: identify what's broken, take ownership, and ship the fix.


The Full Infrastructure Rebuild Playbook πŸ“–

We documented every step, every decision, and every lesson learned from this migration. No gatekeeping.
Get the complete guide here: How We Rebuilt Our Infrastructure From Scratch


We're hiring. If you're the type of engineer who sees "nobody understands this system" as a challenge rather than an excuse, let's talk: https://jobs.ashbyhq.com/motion/4f5f6a29-3af0-4d79-99a4-988ff7c5ba05

Top comments (0)