Skip to content

SCHEMA — infra

OpenTofu root modules for the fleet's infrastructure as code: what outlives a container (ADR 0003, docs/PLATFORM.md).

Conventions

  • One directory per root module; every root module is initialised and validated by .github/workflows/infra.yml.
  • Inputs are generated by tools/dash node gen / dash infra plan into .fleet/nodes/; state lives in nodes.infra.state_dir, outside the tree.
  • Provider and version constraints are floors (>=), never ceilings; no .terraform.lock.hcl is committed.

Structure

entry kind purpose rules
README.md file What this layer owns, how to plan and apply it, and how to adopt existing resources required
node/ dir Root module for one fleet node: its fleet Docker network and the volumes of the services placed on it required

Placement

  • New kind of infrastructure (a cluster, a registry, DNS) → a new root module directory here, with its own SCHEMA.md, validated by infra.yml.
  • Anything unrouted → propose an entry in this table first, then create it.

Forbidden

  • No state, plan or lock file (*.tfstate*, *.tfplan, .terraform/, .terraform.lock.hcl).
  • No secret values — a module takes a credential by variable from the environment, never a literal.
  • No hand-written *.tfvars — the inputs are generated from _data/fleet.yml.