Skip to content

Exit Codes

Documented from tag v0.6.0 and the tagged command docs.

CodeMeaning
0Success. For plan, no changes. For apply, planned mutations finished (including a zero-change apply). For validate and import, the command succeeded. For destroy, success including a declined confirmation with no mutations.
1Runtime, validation, or provider failure, including failed planning, apply, import, or destroy. Incomplete apply still exits 1. destroy also exits 1 when provider-owned or unsupported remnants remain after supported teardown.
2plan succeeded and resource or provider actions are present. Intended for CI/GitOps workflows.
3Invalid CLI usage (wrong arguments, unknown flag, or unknown command).

validate, apply, import, and destroy do not use exit code 2.