Terraform has you write HCL to define each cloud resource by hand. Encore provisions infrastructure automatically in your AWS or GCP account from your application code. Ship quickly, without writing or maintaining infrastructure config.
“What used to take days or weeks of back-and-forth between developers and infra teams is now automated and completed in minutes.”
Terraform describes infrastructure in separate HCL files you write and keep in sync. Encore infers it from the application code, then provisions the managed service, its networking, IAM, and secrets.
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});resource "aws_db_instance" "users" {
identifier = "users-db"
engine = "postgres"
instance_class = "db.t3.micro"
allocated_storage = 20
db_name = "users"
username = var.db_username
password = var.db_password
vpc_security_group_ids = [
aws_security_group.rds.id
]
# ... plus networking, IAM, secrets
}Encore sets all of this up from your application code. It's real infrastructure in your own cloud account, so you can always open the console and look. You just never have to build it by hand.
Writing infrastructure code yourself keeps you in your own cloud, but costs time and expertise. Encore gives you the same ownership, without the config.
Do it yourself Terraform, IAM, VPCs | Hire DevOps One senior engineer | Hosted platform Heroku, Render, Supabase | Encore Automated, in your cloud | |
|---|---|---|---|---|
| Time to first production deploy | Weeks | Months, after the hiring search | Minutes | Minutes |
| Ongoing cost | Your best engineer's evenings | $150k to $250k a year, fully loaded | Grows fast with usage | From $49 per member a month |
| Every new database or queue | Another day of config | A ticket in their queue | Limited to what they offer | One line of code |
| Runs in your AWS or GCP account | Yes | Yes | No | Yes |
| Your cloud credits apply | Yes | Yes | No | Yes |
| Answers "where is our data?" in security reviews | If set up right | Yes | Their answer, not yours | Your account, your VPC |
| When you grow | Rewrite what you hacked together | Hire a second one | Migrate off, usually at the worst time | Nothing changes |
| If the key person leaves | Nobody knows how it works | Same problem | Not your problem | Not your problem |
Both Encore and Terraform deploy to your own AWS or GCP account. The difference is how you define infrastructure.
With Terraform, you write HCL that maps directly to cloud provider APIs. You need to understand VPCs, security groups, IAM policies, and cloud-specific configurations.
With Encore, you write application code. Encore provisions the cloud-specific details like networking, IAM, and security using sensible defaults for each provider. When you need more control, those defaults are yours to configure.
Learn more about infrastructure ownership →Terraform is for provisioning cloud resources and doesn't help with local development. You'd need to set up Docker containers, local databases, and manage your development environment separately.
Encore runs encore run and automatically provisions local PostgreSQL, Pub/Sub emulation, and cron scheduling. A local dashboard shows distributed tracing and architecture diagrams.
Your local and production environments use the same code, eliminating "works on my machine" problems.
Learn more about local development →With Terraform, every IAM role, policy document, and trust relationship is something you write and maintain by hand, and over-broad permissions are easy to ship by accident.
Encore knows which services touch each database, queue, bucket, and secret, and generates per-service IAM policies with only those permissions. Secrets are referenced by name and stay encrypted and environment-scoped, so credentials never enter the repository.
Every other combination stays denied — you never write the policy.
With Terraform, infrastructure lives in separate HCL files. AI agents like Cursor and Claude Code lack context about how these relate to your application code, leading to drift, hallucinations, and configs that are hard to review.
Encore defines infrastructure in your application code. AI agents see everything in one context: your APIs, databases, queues, and how they connect. This makes AI-generated code accurate, reviewable, and safe to deploy.
Because the infrastructure comes from Encore's defaults rather than hand-written HCL, you can let an AI agent build features and trust the result is provisioned correctly. Guardrails, auto-generated docs, and built-in observability keep what it produces readable and maintainable as it grows.
Learn about AI-assisted development →Encore and Terraform work together. Encore can manage the resources your application uses while Terraform keeps DNS, organization-level networking, and third-party providers. Existing RDS, Cloud SQL, S3, GCS, SNS, and Pub/Sub resources can be connected to Encore rather than recreated.
The migration guide covers how each Terraform resource converts, where each setting is configured, and how to run Encore alongside your existing Terraform.
Read the Terraform migration guide"Encore is our foundation for all new development. Since adopting it, we've seen a 2-3x increase in development speed and 90% shorter project lead times."
"Encore lets us go from idea to shipped product at least 3x faster and saves us hours of devops work every week."
"We've reduced time spent on DevOps by 95%, and we're now on track to save $60K annually in cloud costs."
"Encore is an unfair advantage. At Pave we've moved 2x faster than we did at Monzo."
"We're saving $200k+ annually compared to additional hiring. The ROI is outstanding, easily 10x."
"You define infrastructure in your code and it's automatically spun up for you. You can go from zero to a deployed service on GCP in an hour. I don't know how else to do it."
"Encore's inferred infrastructure has allowed us to move at unprecedented speed. Combined with database branching in Neon, we're able to spin ephemeral environments up and down with incredible ease. Stakeholders love preview app URLs."
Common questions about Encore vs Terraform.
Encore provisions infrastructure in your own AWS or GCP account based on your application code. No separate config files needed. Terraform requires writing HCL configuration files that describe every resource, state management, and manual synchronization between your application and infrastructure.
Encore is purpose-built for backend development with built-in databases, Pub/Sub, cron jobs, and distributed tracing out of the box. Terraform is a general-purpose infrastructure tool that requires you to understand cloud services and write HCL for each resource. For backend development, Encore provides a significantly better developer experience.
No. Encore abstracts away infrastructure complexity. You define databases and queues in your application code, and Encore provisions the corresponding AWS or GCP resources. Terraform requires understanding HCL, cloud provider APIs, state management, and infrastructure best practices.
Terraform has no local development solution and is purely for provisioning cloud resources. Encore runs everything locally with a single command: databases, Pub/Sub, cron jobs, and distributed tracing. No cloud connection required.
Encore provides infrastructure-from-code (inferred from your app), built-in observability with distributed tracing, automatic IAM policies, type-safe APIs, and auto-generated documentation. Terraform requires separate HCL files, manual observability setup, and deep cloud expertise.
Yes. Encore provisions application infrastructure (databases, Pub/Sub, compute) in your cloud account. You can use Terraform for other infrastructure concerns like networking, DNS, or resources outside your application scope. They work in the same AWS or GCP account.
Deploy to your own AWS or GCP account, with infrastructure provisioned automatically.