tofu_external_module — alias for terraform_external_module.
Same rule under both names: a module fetched from outside the workspace is
engine-neutral, so tofu_external_module is just a naming alias so
OpenTofu-only projects don't have to import a terraform_* symbol.
Rules
tofu_external_module
load("@rules_terraform//tofu:tofu_external_module.bzl", "tofu_external_module")
tofu_external_module(name, srcs, source, subdir, version)
A module whose files come from outside the workspace.
The deps tag declares one per registry or git module it resolves. Declare
one yourself, in the build_file_content of an http_archive or
git_repository, for a module the extension cannot fetch. source must
match the module block verbatim; list the target in the consuming
terraform_module's deps.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| srcs | Every file of the module's repository or archive, not only the module's own: templates and other data the configuration reads, and the siblings a ../ source inside it names. | List of labels | optional | [] |
| source | The source string exactly as the module blocks write it. The module is installed under every block whose source matches. | String | required | |
| subdir | The module's directory inside srcs: the //subdir of the source, empty for the archive root. | String | optional | "" |
| version | The module's version, for a registry module. Leave it empty for a git or other source: the manifest only accepts a semantic version. | String | optional | "" |