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

Fix terraform console crash for ephemeral values #36267

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Jan 6, 2025

We now check if a value has an ephemeral mark before trying to format it. The check prevents us from passing a marked value to go-cty's AsString function, which leads to a crash.

Fixes #36261

Target Release

1.10.x

I believe this could be backported?

Draft CHANGELOG entry

BUG FIXES

  • Fix Terraform Console crash when printing ephemeral values

@dbanck dbanck added the bug label Jan 6, 2025
@dbanck dbanck requested a review from a team as a code owner January 6, 2025 13:32
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Oh my, I came across this one but then completely forgot about it!

Thanks for remembering/finding it and fixing 😅

@dbanck dbanck 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 Jan 6, 2025
We now check if a value has an ephemeral mark before trying to format
it. The check prevents us from passing a marked value to go-cty's
AsString function, which leads to a crash.
@dbanck dbanck force-pushed the b-fix-ephemeral-console-crash branch from 2df346b to f26b82d Compare January 6, 2025 15:26
@dbanck dbanck merged commit c3fb92c into main Jan 6, 2025
11 checks passed
@dbanck dbanck deleted the b-fix-ephemeral-console-crash branch January 6, 2025 15:51
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

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 bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform console crash when showing ephemeral variables
2 participants