zuke.tools.terraform
@zuke/terraform 1.0.1: @zuke/terraform — typed TerraformTasks wrappers for the terraform CLI, for use in Zuke build targets (infrastructure-as-code workflows).
zuke on PyPI ↗ 9 symbols
Symbols
class TerraformApplySettings(TerraformSettings) Settings for terraform 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 TerraformDestroySettings(TerraformSettings) Settings for terraform 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 TerraformFmtSettings(TerraformSettings) Settings for terraform fmt.
-
check() -> SelfCheck formatting without writing changes (
-check). -
recursive() -> SelfAlso process nested directories (
-recursive). -
diff() -> SelfShow a diff of formatting changes (
-diff).
class TerraformInitSettings(TerraformSettings) Settings for terraform 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 TerraformOutputSettings(TerraformSettings) Settings for terraform 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 TerraformPlanSettings(TerraformSettings) Settings for terraform 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 TerraformSettings(ToolSettings) Base for all terraform subcommand settings: binary is terraform.
class TerraformTasks Typed task functions for the terraform CLI.
-
static async init(ctx: ServiceContext, configure: Callable[[TerraformInitSettings], TerraformInitSettings] | None=None) -> ExecResultInitialize a working directory:
terraform init. -
static async validate(ctx: ServiceContext, configure: Callable[[TerraformValidateSettings], TerraformValidateSettings] | None=None) -> ExecResultValidate the configuration:
terraform validate. -
static async plan(ctx: ServiceContext, configure: Callable[[TerraformPlanSettings], TerraformPlanSettings] | None=None) -> ExecResultCreate an execution plan:
terraform plan. -
static async apply(ctx: ServiceContext, configure: Callable[[TerraformApplySettings], TerraformApplySettings] | None=None) -> ExecResultApply the changes:
terraform apply. -
static async destroy(ctx: ServiceContext, configure: Callable[[TerraformDestroySettings], TerraformDestroySettings] | None=None) -> ExecResultDestroy managed infrastructure:
terraform destroy. -
static async fmt(ctx: ServiceContext, configure: Callable[[TerraformFmtSettings], TerraformFmtSettings] | None=None) -> ExecResultFormat configuration files:
terraform fmt. -
static async output(ctx: ServiceContext, configure: Callable[[TerraformOutputSettings], TerraformOutputSettings] | None=None) -> ExecResultRead output values:
terraform output.
class TerraformValidateSettings(TerraformSettings) Settings for terraform validate.
-
json() -> SelfEmit machine-readable JSON output (
-json).