tofu_validate_test

Rules

Aspects

tofu_validate_test

load("@rules_terraform//tofu:tofu_validate_test.bzl", "tofu_validate_test")

tofu_validate_test(name, env, env_inherit, target, workspace)

A rule for running tofu validate on a Terraform target.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
envEnvironment variables for the engine, set over the host's for a run and over the hermetic one for a test: TF_VAR_<name> for a root keyed on an input variable, TF_LOG, TF_CLI_ARGS_plan. Values are literal. TF_WORKSPACE here and workspace must agree.Dictionary: String -> Stringoptional{}
env_inheritVariables the test takes from the environment bazel test ran in, AWS_PROFILE say. The variables tests scrub for hermeticity (the CLI configuration ones) cannot be inherited, and the runner says so.List of stringsoptional[]
targetThe target to validate.Labelrequired
workspaceRun in this Terraform workspace, over anything the environment or --test_env sets. Unset, the environment's TF_WORKSPACE applies, else default. One test per workspace is how a root keyed on terraform.workspace gets each one checked, and one binary per workspace runs it with no workspace select first.Stringoptional""

tofu_validate_aspect

load("@rules_terraform//tofu:tofu_validate_test.bzl", "tofu_validate_aspect")

tofu_validate_aspect()

An aspect for running tofu validate on targets with Terraform sources.

ASPECT ATTRIBUTES

ATTRIBUTES