Handle unknown values in ephemeral resource config #35958
+141
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.