Solutions

Terraform guardrails that hold up in an audit.

Guardrails are the rules around a change: what may be requested, what values make sense, who reviews it, and what evidence is left behind.

Definition

Terraform guardrails are the constraints that keep a change predictable. In practice that means approved modules only, typed inputs, scoped cloud zones, permission boundaries, and a review before apply.

The goal is not to stop people. It is to make the safe path the short one, so nobody has to remember the rules under pressure.

Three tools that get confused

  • Module constraints decide what can be requested at all. If it is not in the catalog, it cannot be built.
  • Policy-as-code (OPA, Sentinel) checks the plan against rules: no public buckets, no wildcard permissions, approved regions.
  • Human approval puts a named person behind a decision and records it.

They overlap but do not replace each other. Policy can prove a bucket is not public. It cannot decide whether this team should own a bucket at all.

Two reviews, two different questions

The first review happens before planning and asks one thing: is this the right change for this service? A team approver can answer that quickly, because it is a question about intent, not about Terraform.

The second review happens after the plan and asks a different question: does the plan do exactly what was asked? A cloud administrator reads the diff. Both reviews stay short because neither is asked to do the other's job.

Collapse them into one step and the reviewer has to hold two contexts at once, which is how approvals turn into rubber stamps.

Separation of duties has to be enforced

A policy that says requesters cannot approve their own changes means little if the system allows it. The rule belongs in the workflow and in the database, not in a document.

The same applies to ordering: a plan review that happens before the intent review is not the process anyone agreed to. If the platform can produce that state, it eventually will.

What an audit asks for

Six months later, someone wants to know why production has a bucket with a 30-day retention policy. A defensible answer has six parts:

  • The request and who made it.
  • The module version that ran.
  • The exact input values.
  • Both decisions, with comments and timestamps.
  • The plan that was approved.
  • The apply result and the outputs it produced.

If any part lives in a chat thread, you do not have it. Chat is not evidence, because it can be edited, deleted, or simply lost when someone leaves.

Keeping guardrails out of the way

Guardrails fail when they add work to routine requests. A few things that help:

  • Make the common request one screen with sensible defaults.
  • Only gate what a person genuinely needs to decide.
  • Review the plan, not the configuration file.
  • Let teams see their own history, so they can answer questions without asking you.

How InfraPlat does it

Approved modules define what can be requested. A team approver reviews intent, a cloud administrator reviews the plan, and the requester cannot approve their own revision. Decisions, plans, and applies are written to an append-only audit log.

The catalog side is in the service catalog page, the request path in Terraform self-service, and the technical controls in security.

Walk through the two review gates with a real change from your own repository.

Book a 30-minute call