A decision by team and project type: when Terraform or OpenTofu earns its place, when it is overhead, and what to use instead.

You still need Terraform (or its open source fork OpenTofu) if you run multi-cloud infrastructure, have a platform team that owns provisioning, work under formal change control, already have a large Terraform estate, or manage networking, IAM and DNS by hand. You do not need it for a backend whose infrastructure is a database, a queue, a bucket and a few cron jobs on AWS or GCP. For that, Encore, an infrastructure from code tool, provisions those resources from the TypeScript or Go code that uses them, in your own cloud account, with no HCL and no state file.
Terraform became the default answer to "how do we manage infrastructure" when teams provisioned VMs, networks and load balancers by hand, and any tool that made that repeatable was a clear win. A typical backend in 2026 looks different: a few managed services, all in service of one application, changed by the same people (and agents) who change the code. Before you write your first main.tf, or the next one, check which of the two groups below you are in.
The ranking is for application developers, which is who usually asks this question. If you are on a platform team running shared infrastructure for 40 services across clouds, read the table bottom-up: OpenTofu or Terraform first.
Terraform gives you a declarative description of infrastructure in HCL, a resource graph it uses to compute changes, a state file that records what it believes exists, and a plan/apply cycle that shows you the diff before you commit to it. The provider ecosystem covers AWS, GCP, Azure, Cloudflare, Datadog and hundreds of other APIs through one interface.
That buys you:
It also costs you a separate language, a separate codebase, a state file you have to store, lock and protect, and module and provider knowledge your team has to carry. Whether you need Terraform comes down to whether that value outweighs that cost for your situation.
If you match these, Terraform or OpenTofu is the right tool and the setup cost pays for itself.
You run infrastructure across more than one cloud. Once your estate spans AWS and GCP, or AWS and Cloudflare, or on-prem and a public cloud, you want one tool and one workflow across all of it. Terraform's provider model is the strongest answer there, while cloud-native tools such as CloudFormation stop at their own cloud's edge.
You have a dedicated platform or ops team. When provisioning is owned by people whose job is infrastructure, explicit state, plan review and module libraries are the controls they want. The overhead that feels heavy to an app developer is the workflow a platform team is built around.
You have compliance, audit or change-control requirements. Regulated environments need a record of every infrastructure change, an approval gate before it lands, and a policy layer that can block non-compliant resources. Terraform plus a policy engine (Sentinel, OPA/Conftest) and a run platform (HCP Terraform, Spacelift, env0) is a path auditors recognize.
You already have a large Terraform estate. With thousands of resources under management and a team fluent in the codebase, the question is not "do we need Terraform" but "is there any reason to move." Usually there is not, at least not for the estate as a whole. New application services are a different question, covered below.
You provision infrastructure that is not application-level. VPCs, subnets, IAM policies, DNS zones, VPN and transit gateways and hand-tuned security groups are what Terraform was built for, and nothing at the application layer replaces it.
These are the cases where teams reach for Terraform out of habit and pay a setup and maintenance cost that buys them little.
You are a small team on a single cloud. For one or two engineers shipping an app on AWS or GCP, the remote state backend, state locking, module structure and CI wiring are often more moving parts than the infrastructure they manage.
You are starting a new backend. With no estate to preserve, there is no reason to adopt HCL by default. This is the cheapest moment to declare Postgres, object storage, Pub/Sub and scheduled jobs next to the code that uses them.
Your infrastructure is entirely application-level. If everything you provision is a database, a cache, a queue, a bucket or a scheduled job for one application, a separate IaC codebase describing those resources is a second source of truth that has to stay in sync with the first.
A platform already provisions for you. If a PaaS already creates and manages your resources, adding Terraform on top duplicates work the platform is doing.
You provision rarely, and by hand is fine. For a handful of resources you will create once, the cloud console or a short CLI script is faster than a Terraform workflow you will barely use.
The more of these you answer "yes" to, the more Terraform earns its place:
Mostly "no" means you are in skip-it territory. Mixed answers are common: a platform team keeps Terraform for the VPC and IAM baseline, and application teams stop writing HCL for the databases and queues their services use.
Terraform, Pulumi and CDK share one shape: infrastructure is described in a separate codebase, tracked in a separate state file and applied by a separate tool. The application has no awareness of the infrastructure it depends on, and the IaC has no awareness of how the app uses it.
Infrastructure from code removes that split, and Encore lets a TypeScript or Go service declare the resources it uses, and provisions the matching cloud services from those declarations. Here is a sign-up service with a database, an object storage bucket for avatars, a cache for rate limits and a nightly cleanup job:
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Bucket } from "encore.dev/storage/objects";
import { CacheCluster, IntKeyspace, expireIn } from "encore.dev/storage/cache";
import { CronJob } from "encore.dev/cron";
// RDS on AWS, Cloud SQL on GCP, Docker locally.
const db = new SQLDatabase("users", { migrations: "./migrations" });
// S3 on AWS, Cloud Storage on GCP, local disk in development.
export const avatars = new Bucket("avatars", { public: true });
// ElastiCache or Memorystore (Redis) in the cloud, in-memory locally.
const cache = new CacheCluster("users-cache", { evictionPolicy: "allkeys-lru" });
const signupAttempts = new IntKeyspace<{ email: string }>(cache, {
keyPattern: "signup/:email",
defaultExpiry: expireIn(60 * 60 * 1000),
});
function normalizeEmail(email: string): string {
return email.trim().toLowerCase();
}
export const signup = api(
{ expose: true, method: "POST", path: "/signup" },
async (req: { email: string }): Promise<{ ok: boolean }> => {
// Key the limit by the email being registered, never by a client-supplied IP.
// Production should also throttle at the edge by the trusted connection address.
const email = normalizeEmail(req.email);
const attempts = await signupAttempts.increment({ email }, 1);
if (attempts > 5) return { ok: false };
await db.exec`INSERT INTO users (email) VALUES (${email})`;
return { ok: true };
},
);
export const cleanup = api({}, async (): Promise<void> => {
await db.exec`DELETE FROM sessions WHERE expires_at < now()`;
});
// Scheduled by the Encore platform; no scheduler to configure.
const _ = new CronJob("cleanup", {
title: "Nightly cleanup",
schedule: "0 3 * * *",
endpoint: cleanup,
});
The equivalent database alone, the Terraform way:
resource "aws_db_instance" "users" {
identifier = "users"
engine = "postgres"
engine_version = "17"
instance_class = "db.t4g.micro"
allocated_storage = 20
db_name = "users"
username = var.db_username
password = var.db_password
db_subnet_group_name = aws_db_subnet_group.main.name
vpc_security_group_ids = [aws_security_group.db.id]
skip_final_snapshot = true
}
# plus the subnet group, security group, parameter group,
# a place to store db_password, the bucket, the cache cluster,
# the scheduler, the IAM policies, and a way to run migrations.
The Terraform version exposes every RDS setting, which is what a platform team tuning a shared database fleet wants. The Encore version is derived from the code that uses it, runs locally with encore run against a local Postgres in Docker and an in-memory cache, and has no state file. The Encore platform provisions RDS, S3 and ElastiCache in your own AWS account (Cloud SQL, Cloud Storage and Memorystore on GCP), and Encore provisions an IAM role for the service, or a service account on GCP. Instance sizes, networking and backups stay adjustable in infrastructure configuration. Encore's tooling is open source, and encore build docker produces a standalone image if you later want to run it yourself.
Yes, and for teams with an existing estate this is the usual setup. Terraform keeps the VPC, IAM baseline and shared resources. Encore services can use existing RDS databases, and the Encore Terraform provider lets the rest of your Terraform read Encore-managed resources. See replace application Terraform for an incremental path.
Verdict. Terraform is not dying, and for multi-cloud estates, platform teams, regulated change control and network-level infrastructure it is still the right tool; pick OpenTofu if the license matters to you. For a TypeScript or Go backend on AWS or GCP whose infrastructure is databases, queues, buckets, caches and cron jobs, you do not need it: Encore provisions those from your code in your own cloud account. The mistake is adopting Terraform as the default without checking which group you are in.
If you are about to write HCL for a new service's database and queue, try Encore on that service first and keep Terraform for the parts of the estate it is good at.
Windows: iwr https://encore.dev/install.ps1 | iex
Linux: curl -L https://encore.dev/install.sh | bash
Only if your infrastructure needs it. Keep Terraform or OpenTofu for multi-cloud estates, dedicated platform teams, regulated change control, large existing estates and network-level resources. For a backend whose infrastructure is databases, queues, buckets, cron jobs and secrets on AWS or GCP, an infrastructure from code tool such as Encore provisions those resources from the application code, in your own cloud account, with no HCL or state file.
Usually not. For a single-cloud app run by one or two engineers, Terraform's state backend, locking, module structure and CI wiring often cost more time than they save.
Yes, if you work on teams that manage infrastructure at scale or across clouds. Terraform and OpenTofu remain the default for large estates, and HCL is a widely transferable skill. For greenfield single-cloud apps it is less essential than it was five years ago.
If the Business Source License that Terraform moved to in 2023 is a problem for you, OpenTofu is the MPL-licensed fork and accepts the same configuration for most estates. It does not change the workflow: you still write HCL and manage state.
Yes. Managed platforms, PaaS products and infrastructure from code tools provision real cloud resources without HCL. The question is whether your infrastructure fits the application-level resources those tools cover, or whether you need the full range of raw cloud resources Terraform can address.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.