OXYGENHUB
◆ v0.4.0 oxygenflow / images / tofu history
..
build.sh exec …
cli.tfrc …
Dockerfile …
mirror.tf …
README.md …

The OxygenFlow OpenTofu image

A root file system for deploy jobs (oxygenflow#56):

So tofu init, fmt and validate need no network; plan and apply reach the cloud's APIs through allow-listed egress (#55). The guest's environment is the pipeline's, so a job sets TF_CLI_CONFIG_FILE itself (below).

Building and importing

images/tofu/build.sh /path/to/oxygenflow-tofu.tar
scp /path/to/oxygenflow-tofu.tar claude@earth:/home/claude/flow/dl/
ssh claude@earth 'cd ~/flow && FLOW_HOME=~/flow bin/flow rootfs import dl/oxygenflow-tofu.tar'

Pin the printed hash in the pipelines that use it, and push it to the hub (flow rootfs push HASH) so every runner can fetch it.

A provider version in a pipeline's lock file must be in the mirror: bump mirror.tf, rebuild and re-pin when a lock file changes.

Using it

sandbox "tofu" {
    runtime "microvm"
    rootfs "cas://blob/<hash printed by flow rootfs import>"
    memory-limit "2GiB"
    cpu-limit 2
    network "isolated"
    env {
        TF_CLI_CONFIG_FILE "/etc/tofu/cli.tfrc"
        TF_IN_AUTOMATION "1"
        TFLINT_PLUGIN_DIR "/opt/tflint/plugins"
    }
}