Tags: Quickstart · Substrate · Modeling · Automation Substrate: Terraform Cloud
The canonical demo for the cattle wedge. You run a vertical SaaS with isolated per-customer infrastructure, a fleet of clusters with capacity ceilings, and tenants placed onto the least-loaded matching cluster. One command onboards a tenant.
A single OnboardTenant action that:
prod-clusters cell for a recommendation, sorted by tenant-count ascending
(least-loaded first) and filtered by region and tier.Tenant entity in provisioning state.terraform-cloud trigger — Terrantula
resolves the workspace by name, queues a run, and polls until the run reaches a terminal state.runs_on relationship between the tenant and the chosen cluster and
transitions the tenant to active; on failure, transitions to failed and records the cause.Terrantula enforces the per-cluster cap (50 tenants), the fleet-wide cap (500 tenants across
prod-clusters), region/tier matching, and the tenant lifecycle. Terrantula queues the TFC run;
TFC applies it — Terrantula never runs terraform apply itself.
Bring your own Terraform Cloud organization and a workspace (named tenant-onboard, or
override via workspaceName / workspaceId in blueprint.yaml). The workspace must already
exist — Terrantula does not create workspaces.
Terrantula creates the run in TFC, polls until terminal state, and transitions the tenant to
active (or failed). The TFC run URL is captured on the ActionRun's metadata field; the
dashboard surfaces a click-through.
| File | What it is |
|---|---|
blueprint.yaml | The Terrantula schema: EntityType (TenantCluster, Tenant), the prod-clusters cell, the runs_on relationship type, and the OnboardTenant action. |
tenant-acme.yaml | A sample tenant declaration — the input to OnboardTenant. |
deprovision-blueprint.yaml | The reverse workflow: a DeprovisionTenant action. |
terraform/main.tf | The per-tenant Terraform module the action's TFC run applies. |
import-terraform then dashboard.terraform-cloud trigger.Action kind.