Skip to content

Backport of test: don't panic when resolving references that haven't been evaluated into v1.13#37488

Merged
liamcervante merged 1 commit intov1.13from
backport/liamcervante/37409/rarely-shining-poodle
Aug 26, 2025
Merged

Backport of test: don't panic when resolving references that haven't been evaluated into v1.13#37488
liamcervante merged 1 commit intov1.13from
backport/liamcervante/37409/rarely-shining-poodle

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport

This PR is auto-generated from #37484 to be assessed for backporting due to the inclusion of the label 1.13-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: unable to process merge commit: "a96a93c9c98a07f4afb26e0d8ccbaba4bcff3cac", automatic backport requires rebase workflow

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


There's a bit of an inconsistency in the way we handle references to objects that haven't been resolved. Resource and local references result in panics, the other references return dynamic values. This PR updates resources and locals so they behave in the same way as other references.

Note, that references to non-existent resources / locals still results in an error as this is checked separately. This isn't normally an issue in regular Terraform as you would have graph cycles if references were circular during regular execution. But, it is possible to assert values against incomplete plans in both terraform test and terraform console and this is where you would see panics. Users can try to check values that weren't included in the plan because of an error or partial targeting, and this would result in panics. After this PR, we'd see unknown values returned for these references which matches the behaviour of modules / outputs / inputs.

Fixes #37409

Target Release

1.13.1

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

@github-actions github-actions bot force-pushed the backport/liamcervante/37409/rarely-shining-poodle branch from 3a5fc9b to df04266 Compare August 26, 2025 07:21
@github-actions github-actions bot requested a review from liamcervante August 26, 2025 07:21
@liamcervante liamcervante marked this pull request as ready for review August 26, 2025 07:22
@liamcervante liamcervante requested a review from a team as a code owner August 26, 2025 07:22
@liamcervante liamcervante enabled auto-merge (squash) August 26, 2025 07:22
@liamcervante liamcervante merged commit 267e9e0 into v1.13 Aug 26, 2025
7 checks passed
@liamcervante liamcervante deleted the backport/liamcervante/37409/rarely-shining-poodle branch August 26, 2025 07:28
@github-actions
Copy link
Copy Markdown
Contributor Author

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant