#!/bin/sh # Build the OxygenFlow OpenTofu image and write it as a root file system # tarball for `flow rootfs import`. Rebuild when OpenTofu or a pinned # provider version, TFLint or its Google ruleset changes. set -eu here=$(cd "$(dirname "$0")" && pwd) out=${1:-$here/oxygenflow-tofu.tar} TOFU_VERSION=1.13.1 TOFU_SHA256=8ccbc6f8ee21d2827715f3c6e08a9b3e0209b1e62057c05067ef117e047c1a80 TFLINT_VERSION=0.64.0 TFLINT_SHA256=cca9d13e2e1d7a2c627af60ff899a3c9b74212899416aeb96ec764d2ef954537 TFLINT_GOOGLE_VERSION=0.40.0 TFLINT_GOOGLE_SHA256=a5c02b3de937456de2521155831eaf1cc876014a21445bf7dd1621654511fe28 docker build -q -t oxygenflow-tofu \ --build-arg TOFU_VERSION=$TOFU_VERSION --build-arg TOFU_SHA256=$TOFU_SHA256 \ --build-arg TFLINT_VERSION=$TFLINT_VERSION --build-arg TFLINT_SHA256=$TFLINT_SHA256 \ --build-arg TFLINT_GOOGLE_VERSION=$TFLINT_GOOGLE_VERSION --build-arg TFLINT_GOOGLE_SHA256=$TFLINT_GOOGLE_SHA256 \ "$here" id=$(docker create oxygenflow-tofu) docker export "$id" -o "$out" docker rm "$id" >/dev/null echo "$out"