tf_apply
Preview Terraform changes with a plan, then confirm to apply them to real infrastructure.
Instructions
Apply Terraform changes to real infrastructure.
TWO-STEP SAFETY FLOW:
Call without confirmed=true → runs terraform plan, shows the diff, returns without applying.
Call with confirmed=true after reviewing the diff → actually applies the changes.
Never pass confirmed=true without first showing the plan output to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vars | No | Variable overrides in key=value format, e.g. ["region=us-east-1"] | |
| target | No | Limit operation to a specific resource address, e.g. aws_instance.web | |
| varFile | No | Path to a .tfvars or .tfvars.json file | |
| workdir | Yes | Absolute or relative path to the directory containing .tf files | |
| planFile | No | Path to a saved plan file from tf_plan (recommended for exact apply) | |
| confirmed | No | Must be true to actually apply. Omit or set false to preview only. | |
| workspace | No | Terraform workspace to use (default: current workspace) |