terraform-plan
Preview Terraform infrastructure changes
TLDR
Create execution plan
$ terraform plan
Save plan to file$ terraform plan -out=[plan.tfplan]
Plan with variable$ terraform plan -var="[key]=[value]"
Plan destroy$ terraform plan -destroy
Plan specific target$ terraform plan -target=[resource]
SYNOPSIS
terraform plan [options]
DESCRIPTION
terraform plan creates an execution plan showing proposed changes. Compares current state with configuration. Review before applying to understand infrastructure changes.
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
Only refresh state.-detailed-exitcode
Exit 2 if changes planned.
SEE ALSO
terraform(1), terraform-apply(1)
