---
title: "How We Run Terraform At Scale"
description: "Benchling manages 165k AWS resources across 625 Terraform workspaces and 38 accounts with Terraform Cloud, running about 225 applies and 723 plans a day on self-hosted agents in ECS (120 concurrent across dev and prod pools)."
url: "https://swe.quest/articles/how-we-run-terraform-at-scale-37a353d703d62dcb"
canonical: "https://benchling.engineering/how-we-run-terraform-at-scale-da7bb75dc394"
source: "Benchling Engineering"
published: "2025-03-04"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["infrastructure-as-code","deployment","cloud","developer-productivity"]
---

# How We Run Terraform At Scale

A post on [Benchling Engineering](https://swe.quest/sources/benchling.md), published 2025-03-04, 11 min read, Case study. Original: [https://benchling.engineering/how-we-run-terraform-at-scale-da7bb75dc394](https://benchling.engineering/how-we-run-terraform-at-scale-da7bb75dc394)

## Summary

Benchling manages 165k AWS resources across 625 Terraform workspaces and 38 accounts with Terraform Cloud, running about 225 applies and 723 plans a day on self-hosted agents in ECS (120 concurrent across dev and prod pools). Moving from laptop applies with S3/DynamoDB state to a merge-then-apply, untargeted workflow eliminated drift and the -target anti-pattern and saved an estimated 8,000 engineer-hours a year. Custom tooling fills Terraform Cloud's gaps at this scale: a CLI for bulk review and approval by commit, resource address and tag, Slack reminders for pending applies, workspaces provisioned via the tfe provider with owner tags, a module dependency map that limits which directories each workspace watches, a webhook and Lambda that back up state to S3, and generated Dependabot config for provider upgrades. Planned work includes staged rollouts, splitting large workspaces further and agent autoscaling on EKS.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- Terraform workspaces and state ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))
- AWS basics ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- CI workflows ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))

## Keywords

Terraform, Terraform Cloud, AWS, ECS, Dependabot, tfe provider, AWS Lambda

## Related posts

- [How We Use Terraform At Slack](https://swe.quest/articles/how-we-use-terraform-at-slack-a1596aae0a45b4a5.md): Slack Engineering · 2022-10-25 · Medium · 14 min read · Infrastructure as code, Cloud platforms, CI/CD, Developer tools
  Slack runs roughly 1,400 Terraform state files across AWS, GCP, DigitalOcean and NS1, split per account, region and large service so each change touches fewer resources.
- [Infra at Scale: Agents, Tools and Infra-as-Code](https://swe.quest/articles/infra-at-scale-agents-tools-and-infra-as-code-f9ec6b6391330427.md): Benchling Engineering · 2026-11-06 · Medium · 8 min read · Infrastructure as code, AI agents, Deployment, Kubernetes
  Benchling uses scheduled AI agents (Cursor Cloud Agents) to roll out routine updates to 30+ Kubernetes cluster components (Helm charts, AMIs, container images) through dev, staging and prod, while keeping a human approval on every PR.
- [Managing your resources in Terraform can be literally easy and actually fun](https://swe.quest/articles/managing-your-resources-in-terraform-can-be-literally-easy-and-actually-fun-1e67b490567648a5.md): incident.io · 2024-06-25 · Medium · 7 min read · Infrastructure as code, API design, Product engineering
  incident.io's Terraform integration lets users generate readable, commented Terraform config from the existing Workflows and Schedules visual builders, and the same flow handles editing and importing existing resources.
- [Using ClickHouse Cloud and Terraform for CI/CD](https://swe.quest/articles/using-clickhouse-cloud-and-terraform-for-ci-cd-825467f2e42309bb.md): ClickHouse · 2023-07-13 · Medium · 13 min read · Infrastructure as code, CI/CD, Testing, Cloud platforms, Cost optimization
  ClickHouse's new Terraform provider, built on the ClickHouse Cloud API, can provision ephemeral ClickHouse Cloud services for CI.
- [Using Terraform to Manage Infrastructure](https://swe.quest/articles/using-terraform-to-manage-infrastructure-d186c1bad18dabed.md): Shopify Engineering · 2022-03-17 · Medium · 8 min read · Infrastructure as code, Go, Configuration management, Communications
  Shopify's Conversations team replaced GUI-based configuration of Twilio TaskRouter, which routes contact-center tasks to agents, with Terraform.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
