OXYGENHUB
# e0053e047704 oxygenflow / images / tofu / README.md
1.5 KiB · Markdown · last changed The tofu image mirrors hashicorp/google-beta 8.7.0 for Firebase (oxygenhub-gcp decision 0008); imported on Earth as 678bebbb 10 days ago renderedsource blame history raw
1
# The OxygenFlow OpenTofu image
2
3
A root file system for deploy jobs (oxygenflow#56):
4
5
- Debian bookworm, slim, with CA certificates.
6
- OpenTofu 1.13.1, checked against its published SHA-256.
7
- A provider mirror in `/opt/tofu/mirror`: `hashicorp/google` 8.7.0,
8
  `hashicorp/google-beta` 8.7.0 (Firebase) and `cloudflare/cloudflare`
9
  5.28.0, checked by `tofu providers mirror` against the registry's signed
10
  checksums when the image is built.
11
- `/etc/tofu/cli.tfrc` (set by `TF_CLI_CONFIG_FILE`) installs providers
12
  from the mirror only.
13
14
So `tofu init`, `fmt` and `validate` need no network; `plan` and `apply`
15
reach the cloud's APIs through allow-listed egress (#55). The guest's
16
environment is the pipeline's, so a job sets `TF_CLI_CONFIG_FILE` itself
17
(below).
18
19
## Building and importing
20
21
```
22
images/tofu/build.sh /path/to/oxygenflow-tofu.tar
23
scp /path/to/oxygenflow-tofu.tar claude@earth:/home/claude/flow/dl/
24
ssh claude@earth 'cd ~/flow && FLOW_HOME=~/flow bin/flow rootfs import dl/oxygenflow-tofu.tar'
25
```
26
27
Pin the printed hash in the pipelines that use it, and push it to the hub
28
(`flow rootfs push HASH`) so every runner can fetch it.
29
30
A provider version in a pipeline's lock file must be in the mirror: bump
31
`mirror.tf`, rebuild and re-pin when a lock file changes.
32
33
## Using it
34
35
```kdl
36
sandbox "tofu" {
37
    runtime "microvm"
38
    rootfs "cas://blob/<hash printed by flow rootfs import>"
39
    memory-limit "2GiB"
40
    cpu-limit 2
41
    network "isolated"
42
    env {
43
        TF_CLI_CONFIG_FILE "/etc/tofu/cli.tfrc"
44
        TF_IN_AUTOMATION "1"
45
    }
46
}
47
```