Skip to main content
All rbs infra commands share these flags:

Safety at a glance

rbs infra plan

Compute what would change: resources to create, update, delete, replace, or leave unchanged. Nothing is modified.
The plan is saved (default: under .rbs/infra/plans/) so a later rbs infra apply executes exactly what you reviewed. Sensitive values appear as (sensitive) in the diff.
A targeted plan (plan //pkg:*) is a partial plan: it never proposes deleting resources outside its scope. Only a full-workspace plan detects true orphans — resources in state that no declaration mentions anymore.

rbs infra apply

Execute the plan: create, update, or delete cloud resources to match your declarations, then record the results in .reasonos/infra/state/.
Apply shows the plan and asks for confirmation unless -y is passed. A saved plan older than an hour triggers a staleness warning; a consumed plan file is removed after a successful apply.
Set RBS_INFRA_PASSPHRASE before applying resources with secrets. State is committed to git — without the passphrase, sensitive values are stored in plaintext (rbs warns loudly when this happens).

rbs infra destroy

Delete every resource in the selected environment.
Without -y, destroy requires typing yes after naming the environment it is about to level. There is no partial destroy; to remove individual resources, delete their declarations and apply.

rbs infra refresh

Re-read the live resources from the providers and update the state file to match reality. No resources are changed.
Useful after out-of-band changes (console edits, autoscaling) so the next plan diffs against the truth.

rbs infra import

Bring an existing, manually-created resource under rbs management without recreating it.
The address is <resource_type>.<name>; the ID is whatever the provider uses to identify the resource.

rbs infra show

Print the current state: every tracked resource with its provider, ID, and attributes. Sensitive attributes are masked.

rbs infra output

Read values from applied state — workspace outputs, a whole resource, or one attribute.
Sensitive outputs are masked in listings; addressing one directly reveals it. --json prints machine-readable values for scripting.

rbs infra env

Resolve the environment variables a service gets from the infrastructure it uses — the same resolution rbs run performs for service targets.
--uses pulls a resource’s conventional exports (DATABASE_HOST, REGISTRY_URL, …); --need NAME=resource.attribute wires anything explicitly. Values come from applied state, so run rbs infra apply first.

rbs infra graph

Show declared resources and their dependency edges.

rbs infra verify

Smoke-test every declared resource against the real provider binaries — schema validation plus a plan-time dry run — with no credentials and no cloud calls. This is the command to run after editing infrastructure, and the natural CI gate:
It catches wrong attributes, invalid values, and missing requirements before anything reaches apply. Checks that would need cloud credentials are reported as skipped, never failed; any real failure makes the command exit non-zero. Server-side rules (quotas, IAM, name uniqueness) still need a real apply — verify is the fast local rung, not a sandbox replacement.

rbs infra schema

Browse a provider’s complete resource schema — every type it supports, or one type’s full attribute table (types, required/optional/computed, sensitivity).

rbs infra generate

Generate typed, validated .rbs resource definitions from a provider’s schema into your workspace.
Generated files are grouped one per service (aws_s3_* → s3.rbs), carry the provider version pin alongside the schema, and are user-owned — edit or regenerate freely.

rbs infra scaffold

Draft a new cross-cloud abstraction from real provider schemas: attributes that align across providers become the shared surface; the rest become per-adapter candidates for your judgement pass.
Writes the abstraction plus one adapter per mapped provider under infra/ (--out to change), and refuses to overwrite existing files — scaffolds are starting points, not round-trip artifacts. Finish by wiring outputs and env exports, then validate with rbs infra verify and rbs infra plan.