Providers

A provider owns one or more resource kinds and implements the Provider trait: create, update, delete, read, and an optional configure for the corresponding provider "<name>" { ... } block.

stratum routes a resource to a provider by splitting the kind on the first _ and looking up the prefix:

kindprovider
system_packagesystem
system_servicesystem
system_filesystem
system_secret_filesystem
system_ufw_rulesystem
system_dirsystem
ssh_execssh
ssh_filessh
docker_networkdocker
docker_containerdocker
docker_imagedocker
git_repogit

Providers are registered at CLI startup in crates/cli/src/main.rs. Adding one means adding a new crate under crates/providers/, wiring it into the registry, and documenting it here.

Configuration block

A provider "<name>" { ... } block is optional. When present, its body is passed to the provider's configure method during apply. No shipped provider reads its block today — the grammar exists but is currently dormant.

Execution

Side effects run when you pass -y to stratum apply. Without -y, apply prints the plan and exits without touching providers. There is no dry-run mode for providers: once -y is set, every create / update / delete call hits the remote host.

For drift detection, every provider also implements read (a non-destructive query). Coverage today:

kindread returns
system_packagePresent { state: present|absent }
system_servicePresent { enabled, state }
system_filePresent { mode, owner, group, sha256 } or Absent
system_secret_filePresent { mode, owner, group, sha256 } or Absent (content never observed)
system_ufw_ruleUnknown (parsing punted)
system_dirPresent { file_count, manifest_sha256, manifest } or Absent (or Unknown if state's file_count > 200)
ssh_execUnknown (no readable identity)
ssh_filePresent { mode, sha256 } or Absent
docker_networkPresent { name, driver } or Absent
docker_containerPresent { name, image, restart, labels, networks, container_id } or Absent
docker_imagePresent { tag, image_id, id } (echoes prior build_args / context / dockerfile / target / pull_base) or Absent
git_repoPresent { path, url, ref, commit_sha } or Absent

The Unknown cases show up in unreadable counts when you run stratum plan --refresh or after every stratum apply -y. That's intentional for v1.

See each provider's page for the exact attribute schema.