-
Notifications
You must be signed in to change notification settings - Fork 95
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
tfsdk: Allow GetAttribute To Return Unknown Values Instead Of Null When Missing Due To Parent Being Unknown #186
Comments
I think we may also just want to complicate the errors returned by |
Created hashicorp/terraform-plugin-go#113 upstream to noodle on that. |
Another option here is limiting Whether or not that means making that name parameter a |
Module version
Use-cases
As part of fixing #150, the
GetAttribute()
method onConfig
,Plan
, andState
will skiptftypes.ErrInvalidStep
errors and instead return null values when valid, but missing. A related case of this behavior that might be useful for functionality such as plan modifiers and validation is knowing whether the value is instead unknown, which can happen if the value is missing fromConfig
,Plan
, orState
because a parent path value is marked as unknown.Attempted Solutions
Providers can verify if any parent paths are unknown, when a null value is returned. For example in attribute plan modifiers, the entire
Config
,Plan
, orState
value is available.Proposal
Have the
GetAttribute()
method onConfig
,Plan
, andState
automatically perform the parent path checks for unknown. If found, return unknown value for type, otherwise continue returning null value for type.References
The text was updated successfully, but these errors were encountered: