Skip to main content

Resource

The fundamental unit in Pragmatiks. A resource represents a single infrastructure component that can be provisioned, configured, and managed. Each resource has a unique identifier composed of provider/resource/name (e.g., gcp/storage/data-lake). Resources are declarative: you specify the desired state, and Pragmatiks 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, Pragmatiks 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.
When the referenced resource updates, the field reference automatically resolves to the new value.

Lifecycle States

Resources move through these states as Pragmatiks manages them: State transitions are managed by Pragmatiks based on provider responses and dependency status.

Next Steps

Resources

Learn about resource structure and lifecycle.

Reactive Dependencies

Understand automatic change propagation.