OpenTofu Rules
Everything under //opentofu mirrors //terraform but binds to
//opentofu:toolchain_type. Rule bodies are identical — only the
resolved toolchain differs — so behavior stays in lockstep between the
two engines. Data-only rules (opentofu_module, opentofu_provider,
opentofu_provider_group) are literal aliases for their terraform_*
counterparts, provided so an OpenTofu-only project never has to import
a terraform_* symbol.
Public rules
- opentofu_binary —
bazel runwrapper for anytofusubcommand. - opentofu_module — alias for
terraform_module. - opentofu_provider — alias for
terraform_provider. - opentofu_provider_group — alias for
terraform_provider_group. - opentofu_test — runs OpenTofu's HCL native test framework.
- opentofu_validate_test —
tofu validateas a Bazel test. - opentofu_fmt_test —
tofu fmt -checkas a Bazel test.
Module extensions
- extensions —
opentofu_toolchains.