Reference Instance schema
deps
Explicit values or instance references for a package's dependency arguments.
instances.apps.web = { package = packages.web; deps.database = ref.data.postgres;};deps overrides automatic dependency resolution for named build arguments.
Its keys are dependency argument names from the package’s build functions.
Schema
Section titled “Schema”| Property | Value |
|---|---|
| Type | attribute set of any value |
| Default | { } |
| Set at | instances.<namespace>.<name>.deps.<argument> |
Instance references
Section titled “Instance references”Use ref.<namespace>.<instance> to choose a specific managed instance or
import:
instances.apps.web.deps.cache = ref.platform.redis;Kix resolves the reference to the full package view. The normal checks still
apply, including meta.scope, compatibility constraints, and dependency
configuration injection. A reference to a dormant optional instance also
activates it.
Use explicit references when several instances answer the same argument name or when the dependency should cross a namespace boundary.
Direct values
Section titled “Direct values”Any value other than an instance reference is passed directly to the build argument:
instances.apps.web.deps.region = "eu-west-1";A direct value is not a package instance. It has no package outputs, dependency metadata, compatibility checks, or injected configuration. This form is useful only when the build argument’s contract expects that value.
Setting a dependency to null behaves like leaving it unset. Kix then uses
automatic resolution or the build argument’s default.
Auto-instantiation
Section titled “Auto-instantiation”An explicitly wired dependency makes no name-based demand on
availablePackages. If the value is a reference to an optional instance,
Kix activates that instance directly. Other explicit values suppress catalog
lookup for that argument.