zuke.tools.tofu
@zuke/tofu 1.0.1: @zuke/tofu — typed TofuTasks wrappers for the OpenTofu CLI (tofu), for use in Zuke build targets (infrastructure-as-code workflows).
zuke on PyPI ↗ 9 symbols
Symbols
class TofuApplySettings(TofuSettings) Settings for tofu apply.
-
auto_approve() -> SelfApply without an interactive approval prompt (
-auto-approve). -
var(name: str, value: str) -> SelfSet an input variable (
-var=name=value); repeatable. -
var_file(path: str) -> SelfLoad variables from a file (
-var-file=); repeatable. -
no_input() -> SelfDo not prompt for input (
-input=false). -
plan_file(path: str) -> SelfApply a previously saved plan file (positional argument).
class TofuDestroySettings(TofuSettings) Settings for tofu destroy.
-
auto_approve() -> SelfDestroy without an interactive approval prompt (
-auto-approve). -
var(name: str, value: str) -> SelfSet an input variable (
-var=name=value); repeatable. -
var_file(path: str) -> SelfLoad variables from a file (
-var-file=); repeatable.
class TofuFmtSettings(TofuSettings) Settings for tofu fmt.
-
check() -> SelfCheck formatting without writing changes (
-check). -
recursive() -> SelfAlso process nested directories (
-recursive). -
diff() -> SelfShow a diff of formatting changes (
-diff).
class TofuInitSettings(TofuSettings) Settings for tofu init.
-
upgrade() -> SelfUpgrade modules and plugins to the latest versions (
-upgrade). -
reconfigure() -> SelfReconfigure the backend, ignoring saved config (
-reconfigure). -
no_backend() -> SelfDisable backend initialization (
-backend=false). -
no_input() -> SelfDo not prompt for input (
-input=false).
class TofuOutputSettings(TofuSettings) Settings for tofu output.
-
json() -> SelfEmit machine-readable JSON output (
-json). -
raw() -> SelfEmit a single value with no quotes (
-raw); requires a name. -
name(value: str) -> SelfRead a single named output (positional argument).
class TofuPlanSettings(TofuSettings) Settings for tofu plan.
-
out(path: str) -> SelfWrite the plan to a file (
-out=). -
var(name: str, value: str) -> SelfSet an input variable (
-var=name=value); repeatable. -
var_file(path: str) -> SelfLoad variables from a file (
-var-file=); repeatable. -
destroy() -> SelfPlan a destroy run (
-destroy). -
no_input() -> SelfDo not prompt for input (
-input=false).
class TofuSettings(ToolSettings) Base for all tofu subcommand settings: binary is tofu.
class TofuTasks Typed task functions for the tofu CLI.
-
static async init(ctx: ServiceContext, configure: Callable[[TofuInitSettings], TofuInitSettings] | None=None) -> ExecResultInitialize a working directory:
tofu init. -
static async validate(ctx: ServiceContext, configure: Callable[[TofuValidateSettings], TofuValidateSettings] | None=None) -> ExecResultValidate the configuration:
tofu validate. -
static async plan(ctx: ServiceContext, configure: Callable[[TofuPlanSettings], TofuPlanSettings] | None=None) -> ExecResultCreate an execution plan:
tofu plan. -
static async apply(ctx: ServiceContext, configure: Callable[[TofuApplySettings], TofuApplySettings] | None=None) -> ExecResultApply the changes:
tofu apply. -
static async destroy(ctx: ServiceContext, configure: Callable[[TofuDestroySettings], TofuDestroySettings] | None=None) -> ExecResultDestroy managed infrastructure:
tofu destroy. -
static async fmt(ctx: ServiceContext, configure: Callable[[TofuFmtSettings], TofuFmtSettings] | None=None) -> ExecResultFormat configuration files:
tofu fmt. -
static async output(ctx: ServiceContext, configure: Callable[[TofuOutputSettings], TofuOutputSettings] | None=None) -> ExecResultRead output values:
tofu output.
class TofuValidateSettings(TofuSettings) Settings for tofu validate.
-
json() -> SelfEmit machine-readable JSON output (
-json).