Skip to content

Conversation

@github-actions
Copy link
Contributor

Backport

This PR is auto-generated from #37821 to be assessed for backporting due to the inclusion of the label 1.14-backport.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@liamcervante
This person should resolve the merge-conflict(s) by either:

  • Manually completing the cherry picks into this branch
  • Creating a new branch and manually cherry-picking all commits being backported

merge conflict error: POST https://api.github.com/repos/hashicorp/terraform/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Don't backport until after 1.14 release.

Previously, the line state.SetOutputValue(n.Addr, val, n.Config.Sensitive) was (I think) mistakenly outside of a surrounding conditional. This isn't actually causing any problems at the moment, because ephemeral outputs are actually disallowed in root outputs anyway, and only root outputs are written to state but is still an inconsistency.

Also, Stacks and Test do allow root outputs to be ephemeral but for the moment don't record state files anywhere so also not an issue (yet).

This did discover an issue in Test though, as we do use the state file to check output values when requested which worked "by accident" before. Luckily, there is an easy fix for this which is to update the reference evaluator to use the named values object instead of the state file, and is safe to write ephemeral outputs into the named values since that is never made available externally. So, this PR also updates the GetOutput resolver to use the named values instead of the state file to resolve output references from test files.

Fixes #

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.

Overview of commits

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


temp seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA.
If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@liamcervante
Copy link
Member

Closed in favour of #37850

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant