tofu-plan
Preview OpenTofu infrastructure changes
TLDR
Create execution plan
$ tofu plan
Save plan to file$ tofu plan -out=[plan.tfplan]
Plan with variable$ tofu plan -var="[key]=[value]"
Plan destroy$ tofu plan -destroy
SYNOPSIS
tofu plan [options]
DESCRIPTION
tofu plan creates an execution plan for OpenTofu. OpenTofu is the open-source fork of Terraform. Shows proposed changes before applying to infrastructure.
PARAMETERS
-out file
Save plan to file.-var name=value
Set variable.-var-file file
Variable file.-target resource
Target specific resource.-destroy
Plan destruction.-refresh-only
Update state without proposing changes.-refresh=false
Skip syncing state with remote objects.-parallelism n
Limit concurrent operations (default: 10).-detailed-exitcode
Return 0 (no changes), 1 (error), or 2 (changes present).-input=false
Disable prompts for unset variables.-json
Machine-readable JSON output.
SEE ALSO
tofu(1), terraform-plan(1)
