Skip to content

Conversation

@liamcervante
Copy link
Member

Backport after 1.14.0 release.

We currently prevent root modules from exposing ephemeral values via outputs. This makes total sense as the ephemeral values shouldn't be saved or exposed anywhere.

However, in both stacks and terraform test, we sometimes pretend that a module is a root module when it isn't really. This PR disables the ephemeral check within Terraform Test and Terraform Stacks. For Stacks this is fine, as there are additional checks at the higher level to prevent stack outputs themselves being ephemeral. For Terraform Test we want people to actually test non-root modules, so we do need Core to support ephemeral outputs at the root module as the module being tested might not be intended to be consumed as a root module anyway.

Fixes #37805

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@liamcervante liamcervante requested a review from a team as a code owner October 24, 2025 14:53
@liamcervante liamcervante added the 1.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Oct 24, 2025
@jbardin
Copy link
Member

jbardin commented Oct 24, 2025

My 👍 was assuming the failed test was a minor oversight, but the additional planning option seems like the only viable way to make this conditional at the moment.

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

Labels

1.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow the use of ephemeral values in the output for test modules

2 participants