Dependencies & Resources
Dependencies and resources enable type-safe composition of infrastructure components in Massdriver.
Key concepts​
- Resources are what a bundle produces for other bundles to consume — database connection details, cluster credentials, network layouts. Bundles declare them under
resources:inmassdriver.yaml. - Dependencies are what a bundle consumes from other bundles' resources. Bundles declare them under
dependencies:inmassdriver.yaml. - Resource types are the versioned schemas that define the contract between bundles.
Drawing a line between two components on the canvas fills one bundle's dependency with another bundle's resource.
How it works​
When you draw a dependency between bundles on the canvas, Massdriver validates that:
- The resource's type matches the type the dependency expects
- The resource data conforms to the resource type schema
- The bundle versions at each end fall inside the dependency's version ranges
The first two checks happen when you draw the line, so incompatible infrastructure never reaches a deployment. The third is re-checked per environment, so one blueprint can serve environments running different bundle versions.
In this section​
- Resource Type Specification - Authoring, versioning, and publishing a resource type
- Version Resolution - How a version range picks a resource at deploy time
Related documentation​
- Concepts: Dependencies - Version ranges on a dependency
- Concepts: Resources & Resource Types - Conceptual overview
- Bundle YAML: dependencies - What a bundle consumes
- Bundle YAML: resources - What a bundle produces
- Resource Types Repository - Standard resource types (the GitHub repo URL retains the legacy name)