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..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/.
-y is passed. A saved plan older than an hour triggers a staleness warning; a consumed plan file is removed after a successful apply.
rbs infra destroy
Delete every resource in the selected environment.-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.rbs infra import
Bring an existing, manually-created resource under rbs management without recreating it.<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.--json prints machine-readable values for scripting.
rbs infra env
Resolve the environment variables a service gets from the infrastructure it uses — the same resolutionrbs 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: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.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.