Resource
The fundamental unit in pragma-os. A resource represents a single infrastructure component that can be provisioned, configured, and managed. Each resource has a unique identifier composed ofprovider/resource/name (e.g., gcp/storage/data-lake).
Resources are declarative: you specify the desired state, and pragma-os ensures the actual state matches.
Provider
A provider manages one or more resource types. Providers handle the lifecycle operations for their resources: creation, updates, and deletion. Each provider knows how to translate resource configurations into actual infrastructure. Examples:gcp provider manages GCP resources, pragma provider manages platform-internal resources.
Config
The configuration block of a resource. Config contains the settings that define how a resource should be provisioned. These are provider-specific—each resource type accepts different configuration options.Outputs
Values that a resource exposes after provisioning. Outputs allow other resources to reference dynamically-generated values like IDs, URLs, or connection strings. Outputs are only available when a resource reaches READY state.depends_on
Declares explicit dependencies between resources. When resource A depends on resource B, pragma-os ensures B reaches READY state before processing A. Dependencies also trigger automatic updates: when B changes, A is notified.FieldReference
A dynamic value reference using the syntax${provider/resource/name.outputs.field}. Field references resolve at runtime to the actual output values from dependency resources.
Lifecycle States
Resources move through these states as pragma-os manages them:| State | Description |
|---|---|
| DRAFT | Resource defined but not queued for provisioning |
| PENDING | Queued and waiting for dependencies to be ready |
| PROCESSING | Currently being processed by the provider (create, update, or delete) |
| READY | Successfully provisioned and operational |
| FAILED | Operation failed |