opentofu_binary

Rules

opentofu_binary

load("@rules_terraform//opentofu:opentofu_binary.bzl", "opentofu_binary")

opentofu_binary(name, lock, root)

Wraps the opentofu binary for a terraform_module root. Invoke via bazel run — any subcommand and args are passed straight through, so bazel run //x:opentofu -- plan, ... -- apply, ... -- state list, etc. mirror the nominal CLI.

The .terraform directory is assembled hermetically by terraform_init_aspect; providers and modules come from Bazel-managed dependencies rather than the network.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
lockAn optional .terraform.lock.hcl file.LabeloptionalNone
rootThe terraform_module target that serves as the root module.Labelrequired