@zuke/terraform
`@zuke/terraform` — typed `TerraformTasks` wrappers for the `terraform` CLI,
@zuke/terraform on JSR ↗ 10 symbols
Symbols
class TerraformApplySettings extends TerraformSettings Settings for terraform apply.
| Member | Signature | Doc |
|---|---|---|
autoApprove | autoApprove(): this | Apply without an interactive approval prompt (-auto-approve). |
var | var(name: string, value: string): this | Set an input variable (-var=name=value); repeatable. |
varFile | varFile(path: string): this | Load variables from a file (-var-file=); repeatable. |
noInput | noInput(): this | Do not prompt for input (-input=false). |
planFile | planFile(path: string): this | Apply a previously saved plan file (positional argument). |
class TerraformDestroySettings extends TerraformSettings Settings for terraform destroy.
| Member | Signature | Doc |
|---|---|---|
autoApprove | autoApprove(): this | Destroy without an interactive approval prompt (-auto-approve). |
var | var(name: string, value: string): this | Set an input variable (-var=name=value); repeatable. |
varFile | varFile(path: string): this | Load variables from a file (-var-file=); repeatable. |
class TerraformFmtSettings extends TerraformSettings Settings for terraform fmt.
| Member | Signature | Doc |
|---|---|---|
check | check(): this | Check formatting without writing changes (-check). |
recursive | recursive(): this | Also process nested directories (-recursive). |
diff | diff(): this | Show a diff of formatting changes (-diff). |
class TerraformInitSettings extends TerraformSettings Settings for terraform init.
| Member | Signature | Doc |
|---|---|---|
upgrade | upgrade(): this | Upgrade modules and plugins to the latest versions (-upgrade). |
reconfigure | reconfigure(): this | Reconfigure the backend, ignoring saved config (-reconfigure). |
noBackend | noBackend(): this | Disable backend initialization (-backend=false). |
noInput | noInput(): this | Do not prompt for input (-input=false). |
class TerraformOutputSettings extends TerraformSettings Settings for terraform output.
| Member | Signature | Doc |
|---|---|---|
json | json(): this | Emit machine-readable JSON output (-json). |
raw | raw(): this | Emit a single value with no quotes (-raw); requires a name. |
name | name(value: string): this | Read a single named output (positional argument). |
class TerraformPlanSettings extends TerraformSettings Settings for terraform plan.
| Member | Signature | Doc |
|---|---|---|
out | out(path: string): this | Write the plan to a file (-out=). |
var | var(name: string, value: string): this | Set an input variable (-var=name=value); repeatable. |
varFile | varFile(path: string): this | Load variables from a file (-var-file=); repeatable. |
destroy | destroy(): this | Plan a destroy run (-destroy). |
noInput | noInput(): this | Do not prompt for input (-input=false). |
class TerraformSettings extends ToolSettings Base for all terraform subcommand settings: binary is terraform.
const TerraformTasks: TerraformTasksApi Typed task functions for the terraform CLI.
interface TerraformTasksApi The shape of TerraformTasks.
| Member | Signature | Doc |
|---|---|---|
init | init(configure?: Configure<TerraformInitSettings>): Promise<CommandOutput> | Initialize a working directory: terraform init. |
validate | validate(configure?: Configure<TerraformValidateSettings>): Promise<CommandOutput> | Validate the configuration: terraform validate. |
plan | plan(configure?: Configure<TerraformPlanSettings>): Promise<CommandOutput> | Create an execution plan: terraform plan. |
apply | apply(configure?: Configure<TerraformApplySettings>): Promise<CommandOutput> | Apply the changes: terraform apply. |
destroy | destroy(configure?: Configure<TerraformDestroySettings>): Promise<CommandOutput> | Destroy managed infrastructure: terraform destroy. |
fmt | fmt(configure?: Configure<TerraformFmtSettings>): Promise<CommandOutput> | Format configuration files: terraform fmt. |
output | output(configure?: Configure<TerraformOutputSettings>): Promise<CommandOutput> | Read output values: terraform output. |
class TerraformValidateSettings extends TerraformSettings Settings for terraform validate.
| Member | Signature | Doc |
|---|---|---|
json | json(): this | Emit machine-readable JSON output (-json). |