Skip to content

allow output values without top-level ephemeral marks#37210

Merged
jbardin merged 2 commits intomainfrom
jbardin/ephemeral-output
Jun 4, 2025
Merged

allow output values without top-level ephemeral marks#37210
jbardin merged 2 commits intomainfrom
jbardin/ephemeral-output

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Jun 4, 2025

There is currently no way to construct an output value which does not come directly from an ephemeral resource or input. Even if the constructed value is entirely composed of ephemeral attributes or elements, because there is no action to manually mark something as ephemeral (other than a variable block), the resulting value itself is not marked as ephemeral, and fails validation.

Instead of strictly checking for an ephemeral mark on the output value, we can accept any value because the result will always be entirely ephemeral anyway. This mirrors the variable block behavior, which can accept any type of value as input, but is evaluated as ephemeral.

@jbardin jbardin force-pushed the jbardin/ephemeral-output branch from 2c2e246 to 2fe2a5e Compare June 4, 2025 17:11
@jbardin jbardin added the 1.12-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jun 4, 2025
@hashicorp hashicorp deleted a comment from github-actions bot Jun 4, 2025
There is currently no way to construct an output value which does not
come directly from an ephemeral resource or input. Even if the
constructed value is entirely composed of ephemeral attributes or
elements, because there is no action to manually mark something as
ephemeral (other than a variable block), the resulting value itself is
not marked as ephemeral, and fails validation.

Instead of strictly checking for an ephemeral mark on the output value,
we can accept any value because the result will always be entirely
ephemeral anyway. This mirrors the variable block behavior, which can
accept any type of value as input, but is evaluated as ephemeral.
@jbardin jbardin force-pushed the jbardin/ephemeral-output branch from 4fb72c5 to 7d14208 Compare June 4, 2025 17:26
@jbardin jbardin force-pushed the jbardin/ephemeral-output branch from 7d14208 to e4da541 Compare June 4, 2025 17:34
@jbardin jbardin marked this pull request as ready for review June 4, 2025 17:38
@jbardin jbardin requested a review from a team as a code owner June 4, 2025 17:38
@jbardin jbardin changed the title allow outputs without top-level ephemeral marks allow output values without top-level ephemeral marks Jun 4, 2025
@jbardin jbardin merged commit d857f20 into main Jun 4, 2025
13 checks passed
@jbardin jbardin deleted the jbardin/ephemeral-output branch June 4, 2025 19:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 5, 2025

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 Jul 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.12-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.

2 participants