Writ

Writ compared with OpenTofu in plain GitLab CI

What Writ adds to a pipeline whose jobs run tofu themselves, what it costs, and when plain CI is the better choice.

You already run OpenTofu from GitLab CI, and you want to know what Writ would change. In plain CI, your jobs run tofu themselves. With Writ, they ask writ serve to plan and apply. Here's what Writ adds, what it costs you, and when plain CI is the better choice.

Here, "plain GitLab CI" means a merge request job that runs tofu plan and a job on the default branch that runs tofu apply, often through GitLab's OpenTofu component, with state in GitLab-managed state and AWS credentials from the job's OIDC token. Every fact about GitLab on this page comes from those pages and from deployment approvals, read on 2026-11-16. No GitLab pipeline has run Writ's jobs yet, as Status says.

What's different

In plain CI, your job runs OpenTofu and holds what OpenTofu needs: the cloud credentials, the state, and the plan. With Writ, your job sends a commit and holds none of them. writ serve runs OpenTofu, and an approval is for one exact plan.

How they compare

OpenTofu in plain GitLab CIWrit
Where tofu runsIn the CI job, on the runnerIn writ serve, as its own uid for each run, in its own namespaces, on Linux
Cloud credentialsThe job holds them. With OIDC, it trades its token for temporary credentials with sts:AssumeRoleWithWebIdentity awsThe job holds none. writ serve assumes the environment's plan role for a plan, and its apply role for an apply that's approved, or overridden by someone with override. Roles are AWS roles only
The code that runs with themThe commit the job runs, which a merge request can changeThe commit the job sends, fetched from the Git host and checked against Git blob ids. Module sources must pass an allow-list
StateGitLab-managed state on the http backend, "encrypted with the Lockbox Ruby gem when at rest". Reading it needs the Developer role, and tofu apply needs Maintainer or Owner stateThe http backend that writ serve serves, sealed with AES-256-GCM and versioned, where a plan's token can only read. Or the stack's own backend "s3"
What gets approvedA merge request, or with deployment approvals in Premium and Ultimate, a deployment job approvalsA plan id: a SHA-256 over the masked plan, the saved plan, the commit, the stack, and the environment
Who can't approve"By default, the user who triggers a deployment pipeline can't also approve the deployment job", and a project can allow it approvalsThe plan's author, wherever an approval rule applies. No setting allows it
The plan that appliesThe component's fetch-mr-plan "retrieves the approved plan artifact from the associated merge request pipeline". It works only without merge trains, with the merge method "merge commit with semi-linear history" componentThe saved plan writ serve kept. Writ refuses it after a newer plan of the stack, a moved state, or a moved branch
PolicyAn experimental OPA template that evaluates the plan in the pipeline componentRego from the server's config, checked when the plan is created and again before the apply. A mandatory deny has no override
DriftA detect-drift template that fails or warns the job on drift componentScheduled drift checks in writ serve, shown in the control UI and the API. No alert
What the log showsWhat tofu prints, in the job logOne mask over everything Writ stores or shows, tested by just verify-mask, with three named gaps
AuditThe pipeline and job historyA row in the control database's audit log before each answer, except health checks, server discovery, and rate-limited requests. A request fails if its row can't be written. No API or page reads it yet

What plain CI gives you that Writ doesn't

  • Nothing more to run. Plain CI needs runners and GitLab. Writ also needs a host for writ serve, Postgres, a range of provider_uids, and a backup of each state key.
  • Use on a real GitLab. The OpenTofu component runs in real pipelines. Writ's GitLab CI component has run only against a stand-in of GitLab.
  • Notes on the merge request. The component can post the plan as a comment with post_mr_plan_comment component. Writ doesn't post anything to GitLab yet.
  • Maturity. Writ is at version 0, on one node.
  • Any cloud's credentials, the same way. Writ's roles are AWS roles only. A provider for another cloud gets its credentials from files on the server.

Which should you choose?

  • Choose plain CI when the people who can merge are the people who can change the infrastructure, and you accept the risk of the job holding credentials.
  • Choose Writ when a merge request mustn't hold cloud credentials, when an approval must be for the exact plan that applies, or when a change's author must never be its only reviewer. Read What Writ is not, yet first.

Next steps

This page is built from docs/compare-gitlab-ci.md in the repository. It is also served as plain Markdown.

On this page