|
|
|
|
@ -114,13 +114,12 @@ func (d *ResourceData) HasChange(key string) bool {
|
|
|
|
|
// When partial state mode is enabled, then only key prefixes specified
|
|
|
|
|
// by SetPartial will be in the final state. This allows providers to return
|
|
|
|
|
// partial states for partially applied resources (when errors occur).
|
|
|
|
|
//
|
|
|
|
|
// When partial state mode is toggled, the map of enabled partial states
|
|
|
|
|
// (by SetPartial) is reset.
|
|
|
|
|
func (d *ResourceData) Partial(on bool) {
|
|
|
|
|
d.partial = on
|
|
|
|
|
if on {
|
|
|
|
|
d.partialMap = make(map[string]struct{})
|
|
|
|
|
if d.partialMap == nil {
|
|
|
|
|
d.partialMap = make(map[string]struct{})
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
d.partialMap = nil
|
|
|
|
|
}
|
|
|
|
|
|