LinuxCommandLibrary

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.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard