pltf terraform plan

Generate (if needed) and run terraform plan for a spec

Synopsis

Render Terraform and run 'terraform plan'. Supports detailed exit codes, plan file output, targets, locking, refresh toggles, and parallelism. Ideal for CI or local dry runs with the same generation defaults as apply.

pltf terraform plan [flags]

Examples

  pltf terraform plan -f env.yaml -e prod
  pltf terraform plan -f service.yaml -e dev --detailed-exitcode --plan-file=/tmp/plan.tfplan
  pltf terraform plan -f env.yaml -e prod --rover   # renders plan.json and opens rover (https://github.com/yindia/rover)

Options

  -d, --detailed-exitcode     Use detailed exit codes for plan (2 = changes present)
  -e, --env string            Environment key to render (dev, prod, etc.)
  -f, --file string           Path to the Environment or Service YAML file (default "env.yaml")
  -h, --help                  help for plan
  -i, --input                 Ask for input if necessary (default false)
  -l, --lock                  Lock state when locking is supported (default true)
  -T, --lock-timeout string   Lock timeout (e.g. 0s, 30s)
  -m, --modules string        Override modules root; defaults to embedded modules
  -C, --no-color              Disable color output
  -o, --out string            Output directory for generated Terraform
  -p, --parallelism int       Limit Terraform parallelism (0 = default)
  -P, --plan-file string      Write plan to a file (terraform -out)
  -r, --refresh               Update state prior to actions (default true)
      --rover                 Run rover (https://github.com/yindia/rover) against the generated plan.json (requires rover binary in PATH)
  -t, --target stringArray    Optional Terraform target address (repeatable)
  -v, --var stringArray       Override variable as key=value; merges over vars and supports bool/int/JSON/list parsing. Can be repeated for multiple overrides.

Options inherited from parent commands

      --telemetry   Enable anonymous telemetry (usage metrics). Currently a stub/no-op unless enabled.
  -V, --verbose     Enable verbose logging

SEE ALSO

Auto generated by spf13/cobra on 21-Dec-2025