Velocity
Velocity is Stategraph's parallel execution engine for Terraform and OpenTofu. It uses the dependency graph to identify independent subgraphs and execute them concurrently.
Velocity requires a paid tier (Starter, Professional, or Enterprise). The free tier includes the state backend and Insights but not Velocity. Request access to get started.
Usage
Velocity is used through the stategraph tf commands, which replace terraform plan and terraform apply:
# Plan changes
stategraph tf plan --out plan.json
# Apply a plan
stategraph tf apply plan.json
# Plan across multiple states in a single transaction
stategraph tf mtx --out plan.json ./networking ./compute ./application
Configuration
By default, Velocity uses tofu (OpenTofu) as the execution binary. Set the TF_CMD environment variable to use a different binary.
Plan Options
| Option | Description |
|---|---|
--out |
Output file for the plan (required) |
--state |
State ID (auto-discovered from stategraph.json if not set) |
--var |
Set a variable (key=value, repeatable) |
--var-file |
Path to variable file |
--force |
Force a resource address into the plan, supports globs (e.g., data.*) |
--detailed-exitcode |
Return detailed exit code |
| Environment Variable | Description |
|---|---|
TF_CMD |
Path to Terraform/OpenTofu binary (default: tofu) |
Key Concepts
| Topic | Description |
|---|---|
| Transactions | Transaction lifecycle: create, preview, commit |
| Resource-Level Locking | Conflict detection and concurrent transaction handling |
| Multi-State Operations | Coordinating plan/apply across multiple Terraform states |
Other CLI Commands
Lower-level transaction management is available via stategraph tx:
# Create a transaction manually
stategraph tx create --tenant <tenant-id>
# List transactions
stategraph tx list --tenant <tenant-id>
# Abort a transaction
stategraph tx abort --tx <tx-id>
# View transaction logs
stategraph tx logs list --tx <tx-id>
See Transaction Commands for the full CLI reference and API Reference for the REST API.
Getting Started
Velocity requires an activation session to review your state topology and configure execution boundaries.
- Request access to schedule your activation call
- We review your Terraform states and configure Velocity for your environment
- You're running parallel plan/apply, typically within a week