Orchestration

Decide who signs off before anything applies

Orchestration checks approvals, policy, and access on every pull request before it applies. The rules are config in your repository, reviewed like any other change.

Approvals per directory Policy gates Role-based access

In the pull request

The rules run where the change is reviewed

Approvals

Sign-off follows what changed

Apply requirements set who approves each directory, matched by a tag query. A change under iam waits for the security team, and production waits for two platform engineers.

Apply requirements →
.stategraph/config.yml
apply_requirements: checks: - tag_query: "iam in dir" approved: enabled: true all_of: ["team:security"] - tag_query: "production in dir" approved: enabled: true any_of: ["team:platform"] any_of_count: 2

Illustrative. Orchestration uses the first entry that matches a directory.

Policy

A failed check waits for a named approver

Add Checkov, Conftest, or OPA steps, and they check every plan. When a gated check fails, the apply stops until the people named on the gate approve it with a comment. Everyone else sees why it stopped and who can unblock it.

Gatekeeper →
stategraphbot
commented

🚫 Gatekeeper Requirements Not Satisfied

This pull request is blocked until approvals are satisfied.

TokenDirectoryWorkspaceAny ApproversAny Remaining Count
checkov-overrideproduction/networkdefaultteam:security1

These gates are fulfilled by commenting stategraph gate approve <token>.

security-leadcommentedstategraph gate approve checkov-override

Illustrative. The layout follows the comment Orchestration posts when a gate blocks an apply.

Access control

Anyone can plan, a few can apply

Access control grants plan, apply, and override to users, teams, or repository roles, per tag query. Developers plan production changes, and only the SRE team applies them. A user without access sees which directories were skipped and why.

Role-based access control →
.stategraph/config.yml
access_control: enabled: true policies: - tag_query: "production in dir" plan: ["*"] apply: ["team:sre"] - tag_query: "" plan: ["*"] apply: ["role:write"]

Illustrative. The first policy that matches wins, so the catch-all goes last.

Configuration

A pull request cannot loosen its own rules

Orchestration reads access control and apply requirements from the default branch. A branch that edits them changes nothing until it merges. Centralized configuration sets rules for every repository in the organization from one place.

Centralized configuration →
config/overrides.yml
# merged over every repository apply_requirements: checks: - tag_query: "" approved: enabled: true any_of: ["team:sre"] any_of_count: 1 status_checks: enabled: true

Illustrative. The file lives in a central repository named stategraph.

Audit trail

Every run is on the record

Orchestration records each plan, apply, and drift run with who started it, what it touched, and the result. Query the history by user, directory, and date, or export it as CSV or JSON for your auditors.

Audit trail →
A plan run in the Stategraph console: repository, pull request, author, duration, and the result for each directory A plan run in the Stategraph console: repository, pull request, author, duration, and the result for each directory

Real output. A plan run in the console, with its pull request, author, and result.

With Infrastructure as a Database

Every state change on record

Set the engine to Stategraph and each apply also commits a transaction to the database. The transaction records what changed, in which state, and by whom. List it from the CLI, open it in the console, or query it with SQL.

Infrastructure as a Database →
engine and transactions
# .stategraph/config.yml engine: name: stategraph # each apply is a transaction $ stategraph tx list --tenant <id> $ stategraph tx logs list --tx <id>

Illustrative. Commands from the transactions reference.

Make the rules part of the pull request

Write approvals, policy, and access once, and every pull request follows them. Connect GitHub or GitLab and see it on your own repository.

Book a Demo Explore Orchestration