Compositions are declarative templates that allow you to create multiple managed resources in a single file. Instead of provisioning resources individually, you can combine resources into a reusable solution that you can deploy as a single object with your control plane.
Compositions define how your individual resources should be created and managed. When a user or system requests a resources that matches a composition, your control plane:
- Parses the composition to understand what resources to create
- Provisions the resources according to the rules and definitions in your XRD.
- Links the resources it creates together to define them as a single unit.
Compositions and Composite Resource Definitions (XRDs)
Composite Resource Definitions (XRDs) and Compositions are structures to help you define and manage resources, and they serve distinct purposes while working together.
XRDs define the underlying API schema required when requesting resources. Compositions are linked to an XRD and the control plane uses the Composition to provision the resources requested.