Provisioning Ephemeral Cloud Build Runners with Terraform.
Experimented with on-demand Hetzner infrastructure to move expensive Next.js builds from a slow local machine to disposable cloud compute.
I was bored and I wanted to explore a simple question : Instead of permanently paying for powerful build infrastructure, could I provision compute only when I actually need it?
I built a Terraform-based workflow that provisions a temporary Hetzner machine on demand and uses it as a remote Next.js build environment.
Workflow :
- Provision the remote runner with Terraform
- Synchronize the project using rsync
- Execute the production build remotely
- Retrieve the generated artifact
- Destroy the temporary infrastructure
For the experiment, this reduced a roughly 15-minute local build to around 3–4 minutes.
What I explored :
- Infrastructure as Code
- Disposable infrastructure
- Remote build execution
- Compute/cost trade-offs
- Terraform and Hetzner Cloud
This is also a nice demonstration of how I approach infrastructure problems: measure the bottleneck, isolate the expensive workload and test whether infrastructure can remove the constraint.
Next time, I'll add Ansible atop.
Like this project
Posted Aug 22, 2026
Provisioning Ephemeral Cloud Build Runners with Terraform.
Experimented with on-demand Hetzner infrastructure to move expensive Next.js builds from a slow lo...