How Cursor Rebuilt Its Terraform Workflow with Masterpoint: … | Masterpoint Consulting<br>Masterpoint stands with Ukraine. Here’s how you can help Ukraine with just a few clicks. >
LinkedIn<br>GitHub<br>Youtube<br>Newsletter<br>RSS
GET IN TOUCH →
CASE STUDY SUCCESS STORY<br>How Cursor Rebuilt Its Terraform Workflow with Masterpoint: 5x Faster Plans, 2x More Deployments
5x<br>Faster plan time<br>10 min → 2 min
2.6x<br>More infrastructure PRs shipped<br>194 → 500+ per week
91%<br>Reduction in blast radius<br>54 → 5 average cloud resources modified per deployment
6x<br>More Terraform workspaces, now self-service
Executive Summary
Cursor is an applied research AI lab, with products used by over half of the Fortune 500. Cursor’s AWS cloud infrastructure had outgrown the monolithic Terraform architecture it was built on: plans & deployments took 10+ minutes, diffs were noisy and unreadable, and engineers had stopped trusting the system. Masterpoint audited the infrastructure, decomposed the terralith, built an Infrastructure as Code platform with a new scalable architecture, migrated to Spacelift & OpenTofu, and embedded AI agent guardrails so the new architecture sticks, along with a series of platform improvements detailed in the story below. Plans now run 5x faster and engineers ship 2.6x more infrastructure changes every week, all with a 91% reduction in blast radius .
Swipe for more
The Problem<br>Infrastructure That Couldn't Keep Up
By late 2025, Cursor’s Infrastructure as Code (IaC) setup had become one of the biggest friction points in the engineering org. Cursor manages its Amazon Web Services (AWS) infrastructure entirely with Terraform, and that footprint had grown fast. Cursor is no longer just a code editor: the product now extends well beyond the IDE into cloud and background coding agents, automations, agentic workflows, and the training and serving of Cursor’s own frontier models, the Composer family. All of it runs on AWS at massive scale, serving engineering teams of every size, including more than half of the Fortune 500, among them Nvidia, Stripe, Salesforce, PayPal, and Wayfair. Keeping that infrastructure reliable and fast-moving is now core to the business. But like many fast-growing startups, the code behind it had been written quickly and then scaled by copy-paste rather than careful design.<br>Those early Terraform patterns were replicated at machine speed as engineers dogfooded Cursor. They were copied and instantiated hundreds of times without the architectural guardrails needed to keep the system manageable. The result was a classic terralith: critical infrastructure was managed as a single monolithic production Terraform workspace with over 7,000 resources in one state file.<br>And because that workspace was so large, it was too slow.<br>“<br>We had one giant workspace that took way too long to plan. It was killing us.
Travis McPeakSecurity Lead, Cursor<br>But the problem wasn’t just the lack of speed. It was a lack of engineering confidence in the Infrastructure as Code system. Issues included:<br>The AWS console was used to manually make changes during incidents and these fixes were never rolled into Terraform, and so were later inadvertently reverted.<br>Managing ECS deployments through Terraform caused constant drift in the production terralith, flooding PR diffs with hundreds of unrelated changes.<br>Over time, the team stopped trusting the system, let alone reading the diffs.<br>“<br>We would have engineers click apply on prod workspaces that had 120 AWS ECS service changes. The ECS services would change all the time because of drift, so the team became desensitized to large Terraform plan changes.
Travis McPeakSecurity Lead, Cursor<br>This confusion caused downtime, such as a network firewall change that caused a 10-minute outage that was lost in the noise of Terraform drift.<br>The existing platform, Terraform Cloud, introduced some friction too:<br>Workspace management relied on manual ClickOps configuration for each new workspace.<br>The SSO experience was inconsistent.<br>TFC’s resource-under-management (RUM) pricing model made it daunting to scale.
The Engagement<br>What Masterpoint Did
Masterpoint came in for a systematic overhaul, working across the architecture, platform, and developer workflows.
November 2025 - Audit and High Leverage Fixes<br>The engagement opened with Masterpoint’s audit of Cursor’s infrastructure:<br>cloud environments<br>Infrastructure as Code (IaC) & Terraform architecture<br>CI/CD pipelines<br>networking<br>observability<br>Within a week, Masterpoint delivered an audit report, a best practices checklist, and a security scan. The findings included IAM duplication accounted for 70% of the production Terraform state and noisy plan diffs caused engineer review fatigue.<br>The audit phase targeted the highest-leverage fixes first: IAM resource deduplication, workspace trigger and path filter corrections so plans only ran when relevant code changed, and initial breaking up of...