-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I would also consider documenting the depends_on
behaviours/side-effects when ephemeral resources are involved somewhere since we had two provider teams independently being confused by that and I am not entirely sure this change will completely avoid that confusion, although it should reduce it.
Co-authored-by: Radek Simko <radeksimko@users.noreply.github.com>
I'm not sure what to document yet, if anything, for |
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
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 an ephemeral resource configuration contains any unknown values, that resource cannot be opened with the provider. This works in the same way 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.