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

Handle unknown values in ephemeral resource config #35958

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Nov 6, 2024

If an ephemeral resource configuration contains any unknown values, that resource cannot be opened with the provider. This works in the same was as a data source, in that a placeholder is created by Terraform for evaluation, taking the configuration values and inserting unknown values for any computed attributes.

We also add a UI hook for ephemeral resources which can't be read due to unknown values:

  ephemeral.random_password.example: Configuration unknown, deferring...

This is a stopgap to give users some feedback when an ephemeral resource can't be opened, since there is no artifact in the plan which could otherwise be inspected. While the results could generally be inferred, hopefully this helps users more easily figure out what may be happening if they are seeing unexpected results.

There is no json hook implementation so that the machine-readable spec is not bound to the new output until further review. It doesn't really fit with the current json ui model to have messages about what isn't going to happen, so we can determine if that is necessary later.

Ephemeral resources can't be opened if the configuration contains
unknown values.
An Ephemeral resource should not be opened at all if there are any
unknowns in the configuration.
This is a stopgap to give users some feedback when an ephemeral resource
contains unknowns and cannot be opened.

There is no json hook implementation so that the machine-readable spec
is not bound to the new output until further review. It doesn't really
fit with the current json ui model to have messages about what isn't
going to happen.
@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 6, 2024
@jbardin jbardin requested a review from a team November 6, 2024 19:09
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.

1 participant