Description
Module version
v0.4.2
Use-cases
As part of fixing #150, the GetAttribute()
method on Config
, Plan
, and State
will skip tftypes.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 from Config
, Plan
, or State
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
, or State
value is available.
Proposal
Have the GetAttribute()
method on Config
, Plan
, and State
automatically perform the parent path checks for unknown. If found, return unknown value for type, otherwise continue returning null value for type.