Skip to content

Conversation

@jamengual
Copy link
Contributor

Summary

  • Adds a new has-changes output that exposes whether the Terraform plan contains infrastructure changes
  • The output is a string value of "true" or "false"

Motivation

Currently, consumers who want to conditionally run steps based on whether the plan has changes must parse the summary output. The action already computes this internally (used for Infracost integration), but doesn't expose it.

This change simply exposes the existing steps.atmos-plan.outputs.changes value as a proper action output.

Usage

- uses: cloudposse/github-action-atmos-terraform-plan@v4
  id: plan
  with:
    component: mycomponent
    stack: dev

- if: steps.plan.outputs.has-changes == 'true'
  run: echo "Infrastructure changes detected"

Test plan

  • Verify output is "true" when plan has changes
  • Verify output is "false" when plan has no changes

Exposes the existing internal change detection as a new action output,
allowing workflows to easily check if the Terraform plan contains changes.
@jamengual jamengual requested review from a team as code owners December 25, 2025 21:58
@github-actions
Copy link

github-actions bot commented Dec 25, 2025

Changes Found for foobar/changes in plat-ue2-sandbox


create

Plan: 1 to add, 0 to change, 0 to destroy.
To reproduce this locally, run:

atmos terraform plan foobar/changes -s plat-ue2-sandbox

Create

+ random_id.foo[0]
Terraform Plan Summary
  # random_id.foo[0] will be created
  + resource "random_id" "foo" {
      + b64_std     = (known after apply)
      + b64_url     = (known after apply)
      + byte_length = 8
      + dec         = (known after apply)
      + hex         = (known after apply)
      + id          = (known after apply)
      + keepers     = {
          + "seed" = "foo-plat-ue2-sandbox-blue"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Warning: Test warning summary

  with data.validation_warning.warn[0],
  on main.tf line 20, in data "validation_warning" "warn":
  20: data "validation_warning" "warn" {

Test warning details

Warning

Warning: Test warning summary

  with data.validation_warning.warn[0],
  on main.tf line 20, in data "validation_warning" "warn":
  20: data "validation_warning" "warn" {

Test warning details

@goruha goruha merged commit 87aeb94 into main Jan 12, 2026
59 of 61 checks passed
@goruha goruha deleted the feat/add-has-changes-output branch January 12, 2026 19:46
@github-actions
Copy link

These changes were released in v5.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants