Skip to content

Regression: Terraform exit codes no longer passed through after #959 #1064

@goruha

Description

@goruha

Describe the Bug

The changes introduced in PR #959 broke the behavior of passing Terraform exit codes through Atmos. Specifically, when running atmos terraform plan with -detailed-exitcode , Atmos no longer returns the correct Terraform exit code.

Previously, when Terraform returned an exit code of 2, Atmos also returned 2. However, after the update, Atmos returns 1 instead.

Expected Behavior

Atmos should correctly pass through Terraform’s exit codes. If Terraform returns 2 (indicating changes present), Atmos should also return 2.

Steps to Reproduce

Use Atmos version 1.161.0 and run:

atmos terraform plan foo -s bar -detailed-exitcode

Expected result: Terraform returns 2, and Atmos also returns 2.

Upgrade to Atmos version 1.162.0 and run the same command:

atmos terraform plan foo -s bar -detailed-exitcode

Actual result: Terraform returns 2, but Atmos returns 1.

Screenshots

No response

Environment

No response

Additional Context

This issue was introduced after merging PR #959.
The expected behavior was present in version 1.161.0 but broke in version 1.162.0.
This affects automation and scripting that relies on Terraform’s exit codes being preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions