Skip to content

ADR-003: Compile-time provider binding: all parameters resolve at cue eval

Field Value
Status accepted
Date 2025-06-01

Context

Provider templates define commands with parameters ({host}, {container_id}). These could be resolved at runtime or at CUE evaluation time.

Decision

BindCluster matches providers to resources by @type overlap, then #ResolveTemplate substitutes all {param} placeholders from resource fields at cue eval time.

Rationale

Compile-time resolution means CUE catches missing fields before anything runs. A missing container_id is a type error, not a runtime 'undefined variable'.

Consequences

  • Resources must declare all fields their bound providers reference
  • Provider templates use {param} syntax with explicit from_field bindings
  • The output of cue export is fully resolved — ready to execute
  • No runtime templating engine needed