Halving a Terraform Provisioning Pipeline
From four hours to two by measuring bottlenecks and simplifying the delivery path.
My role: Senior DevOps Consultant · Publicis Sapient
Terraform · CI/CD · Infrastructure as Code
The constraint
An environment-provisioning pipeline took four hours to run. The Platform Engineering team needed to understand where the time went before making changes that would keep it fast as it grew.
The decision
I measured stage timings and expensive calls first. The timeline exposed independent modules running in sequence, repeated provider and module downloads, and slow cloud resources blocking other work. I then parallelised work without shared dependencies, cached repeated downloads, and scoped state and applies to reduce unnecessary work.
The result
Pipeline runtime fell from four hours to two. I documented the bottlenecks and the reasoning behind the changes so the Platform Engineering team could keep tracking performance as the pipeline evolved.
Highlights
- Provisioning runtime reduced from 4 hours to 2
- Measured stage timings before changing the pipeline
- Parallel work, caching and smaller applies addressed the measured bottlenecks
Want to talk through any of this? Get in touch.