Why new services queue behind the Terraform repository, how to shorten the review loop you have, and how to take routine databases, queues and cron jobs out of it with infrastructure from code.

To stop waiting on Terraform PRs for new services, let coding agents declare the database, queue and cron jobs in the same change as the application logic, and validate that change in a preview environment instead of a Terraform plan review. Teams bring their own agents, and Encore provides the environments, the system context and the controls. Platform review stays on networks, access policies and shared resources.
If you keep Terraform, per-service state and policy checks shorten the wait.
A new service needs the same few things almost every time: a Postgres database, a queue or topic, maybe a bucket, a scheduled job and two secrets. In most companies those resources live in a shared Terraform repository that a platform team owns, and the request becomes a pull request in that repository.
Four things make that pull request slow:
terraform plan needs credentials for the target account, so the person writing the HCL often cannot see the diff before review.DORA's research on change approval points the same way: approvals work best as peer review during development, backed by automated checks, rather than as a separate gate after the work is done.
The ranking is for the common case, a new service that needs application-level resources. For shared networking, account-wide policies and resources used by many services, a reviewed Terraform change is the right control and should stay.
If moving away from Terraform for new services is not on the table, three changes remove most of the waiting.
Give each service its own root module and state. A per-service stack means a plan only touches that service, state locks stop colliding, and the service team can own the directory through CODEOWNERS. Shared modules for the database, queue and bucket carry the defaults the platform team cares about, such as encryption, backups and tags.
Run the plan in CI and post it to the pull request. Atlantis or HCP Terraform runs do this, so the author and the reviewer read the same plan and nobody needs local credentials for the target account.
Let a policy approve the safe plans. Terraform can write a plan as JSON with terraform show -json, using the documented plan format. A policy then decides which plans need a person. This Conftest policy rejects any delete or replace and any new resource that does not come from an approved module:
package main
import rego.v1
# Modules a service team may use without a platform review.
approved_modules := {"module.service_db", "module.service_queue", "module.service_bucket"}
# Any delete or replace needs a platform review.
deny contains msg if {
some rc in input.resource_changes
"delete" in rc.change.actions
msg := sprintf("%s would be deleted or replaced", [rc.address])
}
# New resources must come from an approved module.
deny contains msg if {
some rc in input.resource_changes
"create" in rc.change.actions
not from_approved_module(rc)
msg := sprintf("%s is not created by an approved module", [rc.address])
}
from_approved_module(rc) if {
some m in approved_modules
startswith(rc.address, concat("", [m, "."]))
}
In CI, the check is three commands:
terraform plan -out=tfplan
terraform show -json tfplan > plan.json
conftest test plan.json
A passing check can auto-approve the pull request for the service team, and a failing one routes it to the platform team with the reason attached. Terraform 1.17 also made Terraform Policy generally available for teams that prefer HashiCorp's own policy language.
This keeps Terraform and shortens the queue, though the service still has two changes to land, the code and the HCL, and the developer still writes infrastructure in a second language.
Encore is built for teams that bring their own coding agents: the team chooses the agent, and Encore provides the environments, the system context and the controls. Infrastructure is declared in application code, so an agent adding a feature declares the database, topic or bucket in the same change as the logic, and Encore provisions those resources in your own AWS or GCP account when you push. There is no Terraform pull request for the service's database, topic or cron job, because there is no separate infrastructure codebase for them.

Here is a new reports service with everything that would otherwise wait in a Terraform review: a database, a bucket, a topic for finished reports and a secret. An agent can add this in the same change as the handler.
// reports/reports.ts (encore.dev 1.58.9)
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Bucket } from "encore.dev/storage/objects";
import { Topic } from "encore.dev/pubsub";
import { secret } from "encore.dev/config";
// RDS on AWS, Cloud SQL on GCP, a local Postgres with `encore run`.
const db = new SQLDatabase("reports", { migrations: "./migrations" });
// S3 on AWS, Cloud Storage on GCP.
const files = new Bucket("report-files", { versioned: false });
export interface ReportReady {
reportId: number;
}
// SNS and SQS on AWS, Google Cloud Pub/Sub on GCP.
export const reportReady = new Topic<ReportReady>("report-ready", {
deliveryGuarantee: "at-least-once",
});
// Stored in AWS Secrets Manager or GCP Secret Manager.
const warehouseToken = secret("WarehouseToken");
export const generate = api(
{ expose: true, method: "POST", path: "/reports" },
async (p: { accountId: number }): Promise<{ id: number }> => {
const res = await fetch("https://warehouse.example.com/export", {
method: "POST",
headers: { Authorization: `Bearer ${warehouseToken()}` },
body: JSON.stringify({ accountId: p.accountId }),
});
if (!res.ok) throw new Error(`warehouse returned ${res.status}`);
const row = await db.queryRow<{ id: number }>`
INSERT INTO reports (account_id) VALUES (${p.accountId}) RETURNING id`;
await files.upload(`reports/${row!.id}.csv`, Buffer.from(await res.arrayBuffer()), {
contentType: "text/csv",
});
await reportReady.publish({ reportId: row!.id });
return { id: row!.id };
},
);
encore run starts the database, bucket and topic locally, so the agent can exercise the service before anyone reviews it. The pull request then gets a preview environment with its own resources, hosted by Encore, which validates the change instead of leaving it in a Terraform plan review queue. Cron jobs are managed by the Encore platform in cloud environments and do not run locally or in previews. On merge, Encore provisions RDS, S3, SNS and SQS and Secrets Manager entries in your AWS account, or the GCP equivalents. Encore provisions an IAM role for the service, or a service account on GCP.
The platform team does not disappear from the loop: it connects the cloud account, sets infrastructure configuration such as instance sizes and backups per environment, and keeps the VPC baseline and shared resources in Terraform. Existing databases can be brought in with RDS import, and the Encore Terraform provider lets the remaining Terraform read Encore-managed resources.
AI integration covers the agent rules and the MCP server the agent can use. An agent's change is type-checked, the database and other local resources run under encore run, and the pull request is validated in a preview hosted by Encore, with no Terraform module the agent cannot run or test.
Run in your terminal to get started locally.
Routine resources for one service, the database, queue, bucket, schedule and secrets, are the ones that should stop going through that review.
Verdict. The wait comes from routing every service's routine resources through one shared review. Policy checks and per-service state make that review faster. Encore removes it for application-level resources: teams bring their own coding agents, an agent declares infrastructure in the same change as the logic, and the change is validated in a preview environment hosted by Encore, which leaves the platform team reviewing the infrastructure that is shared.
The resources for a new service usually live in a shared Terraform repository owned by a platform team. Developers cannot run a plan without cloud credentials, reviewers who know the modules are few, and every change shares state and a review queue with unrelated work, so a database and a queue wait behind everything else.
Yes. It works when each service has its own root module and state, the shared modules have safe defaults, and a policy check in CI blocks risky plans. The platform team then reviews the modules and the policy once instead of every service pull request.
Declare the routine resources in the application itself. Teams bring their own coding agents, and with Encore an agent adds a database, topic or bucket in the same change as the logic, runs the local resources with encore run, and the pull request gets a preview environment hosted by Encore. On git push, Encore provisions the resources in your own AWS or GCP account, so the only pull request is the one with the code.
No. Atlantis runs plan and apply from pull request comments, which removes the step of running Terraform by hand, but a person with module knowledge still has to read and approve each plan. It speeds up the mechanics, not the queue.
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.