Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

[FEAT] Exit code 2 for terraform plan should have the option to "not fail" #109

@cmcnicholas

Description

@cmcnicholas

Is your feature request related to a problem? Please describe.

Currently if you plan with detailed-exitcode you can get 0, 1, 2 as an exit code, 0 being success and 2 being success with changes.

Describe the solution you'd like

I would like the option to indicate that 2 is an acceptable exit code and not fail the command.

Additional context

pipeline errors we get for this:

Failed to execute command: terraform plan -input=false -detailed-exitcode Error: Command failed: terraform plan -input=false -detailed-exitcode
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at runTfCommand (/home/runner/work/xxx/node_modules/@loft-orbital/terraform/src/utils/run-tf-command.helper.js:12:38)
    at /home/runner/work/swr-frontend/xxx/@loft-orbital/terraform/src/executors/plan/executor.js:8:41
    at Generator.next (<anonymous>)
    at /home/runner/work/xxx/node_modules/tslib/tslib.js:169:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/runner/work/xxx/node_modules/tslib/tslib.js:165:16)
    at runExecutor (/home/runner/work/xxx/node_modules/@loft-orbital/terraform/src/executors/plan/executor.js:6:20) {
  status: 2,
  signal: null,
  output: [ null, null, null ],
  pid: 2265,
  stdout: null,
  stderr: null
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions