LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tofu-plan

Preview OpenTofu infrastructure changes

TLDR

Create execution plan
$ tofu plan
copy
Save plan to file
$ tofu plan -out=[plan.tfplan]
copy
Plan with variable
$ tofu plan -var="[key]=[value]"
copy
Plan destroy
$ tofu plan -destroy
copy

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

Copied to clipboard
Kai