Ephemeral preview environments that mirror production

How we spin up disposable environments per pull request without drifting from production.

Cluster of shipping containers at night

Preview environments help us catch integration issues before they land. The trick is making them quick to create and faithful to production.

Bake production parity into templates

We keep Terraform modules and Helm charts identical between preview and production, with environment-specific values loaded from a single defaults file. That removes drift while letting teams override only what they must.

Engineers wiring up cloud diagrams on a whiteboard

Make creation cheap and automatic

A GitHub Action runs on every pull request, provisioning services in a shared Kubernetes cluster with unique namespaces. Secrets are seeded from Vault using short-lived leases, and a TTL controller tears things down after 48 hours.

Test the path to production

Smoke tests hit the preview URL, then run the same contract tests we execute against staging. We also mirror observability: tracing, logs, and SLO dashboards point to the preview namespace so issues are obvious.

By treating preview environments as first-class citizens, we ship changes with higher confidence and fewer surprises on release day.