Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templatefile variables need to be unmarked for TypeFunc #36127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Nov 27, 2024

The templatefile function actually calls the full renderer within the TypeFunc to determine what the resulting type might be, but that also requires unmarking the top-level of the vars map to strip marks even though the value is unused.

Fixes #36123

Target Release

v1.10.1

Draft CHANGELOG entry

BUG FIXES

  • config: templatefile panics when given a sensitive or ephemeral collection of variables

The templatefile function actually calls the full renderer within the
TypeFunc to determine what the resulting might be, but that also
requires unmarking the top-level of the vars map to strip marks even
though the value is unused.
@jbardin jbardin added the 1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Nov 27, 2024
@jbardin jbardin requested a review from a team as a code owner November 27, 2024 21:31
Copy link
Member

@liamcervante liamcervante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, but I'm curious why this wasn't broken prior to 1.10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.10-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.

Terraform v1.10 templatefile can't accept secrets
2 participants