Infrastructure as Code
RBS brings cloud provisioning into the same ecosystem as your build system. Define infrastructure in pure RBS DSL alongside your application code, with full compatibility with the Terraform provider ecosystem.Why RBS for Infrastructure?
| Feature | RBS | Terraform | Pulumi |
|---|---|---|---|
| Language | RBS DSL (Python-like) | HCL (custom) | TypeScript/Python/Go |
| Provider Support | Terraform providers (5000+) | Native | Terraform + native |
| Build Integration | Native | Separate tool | Separate tool |
| Hermetic | Yes | No | No |
| Single Binary | Yes | Requires CLI | Requires SDK + CLI |
Getting Started
1. Register a Provider
Create aninfra.rbs file in your project:
2. Define Resources
3. Plan Changes
4. Apply Changes
Supported Providers
RBS uses the Terraform Plugin Protocol (v5/v6), giving you access to 5000+ providers:.rbs/infra/plugins/.
Resource References
Reference other resources using:name syntax:
Workspaces (Multi-Environment)
Define workspaces for environment-specific values:Reusable Components
Create reusable infrastructure modules using functions:Cloud-Agnostic Abstractions
Define infrastructure once, deploy to any cloud:Build Integration
Reference build outputs in infrastructure:Commands
| Command | Description |
|---|---|
rbs infra plan | Generate and save an execution plan. |
rbs infra apply | Apply changes (uses saved plan if available). |
rbs infra destroy | Destroy all managed infrastructure. |
rbs infra show | Display current state. |
rbs infra refresh | Update state from actual infrastructure. |
rbs infra import | Import existing resources into state. |
rbs infra output | Show output values. |
rbs infra graph | Generate dependency graph (DOT format). |
State Management
State files are stored per workspace in.rbs/infra/state/:
Migration from Terraform
Convert HCL to RBS DSL:- Terraform (HCL)
- RBS DSL