Skip to content

Conversation

@github-actions
Copy link
Contributor

Backport

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

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


Fixes #36652

When a string interpolation contains only one expression sequence, HCL optimizes by wrapping and directly delegating evaluation to that expression. The templatestring function tries to refine the expression value as non-null, and if null, this refinement leads to a panic. For compatibility reasons, HCL has to continue to support this unwrapping logic (See attempted PR), thus we will simply return an error in templatestring when the single evaluated expression is null

Target Release

1.12.x

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 requested a review from dsa0x March 10, 2025 11:38
@dsa0x dsa0x marked this pull request as ready for review March 10, 2025 11:39
@dsa0x dsa0x requested a review from a team as a code owner March 10, 2025 11:39
@dsa0x dsa0x merged commit 5de9af6 into v1.11 Mar 10, 2025
7 checks passed
@dsa0x dsa0x deleted the backport/sams/fix-single-wrapped-null/unlikely-many-frog branch March 10, 2025 12:34
@github-actions
Copy link
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 Apr 10, 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