helper/schema: Drop ClearAll from ResourceDiff

As the interface has been specced out for ResourceDiff, the only diff
operation that can function on a non-computed key is ForceNew, and that
is only if a diff exists for that key. As such, allowing the user to
clear keys that cannot be operated on afterwards does not really make
much sense.

Will re-add this function if it is determined it's needed after all on
review.
This commit is contained in:
Chris Marchesi 2017-05-27 18:19:56 -07:00 committed by Martin Atkins
parent 22220fd0f7
commit 196d7e63fe

View File

@ -206,15 +206,6 @@ func (d *ResourceDiff) UpdatedKeys() []string {
return s return s
} }
// ClearAll wipes the current diff. This cannot be undone - use only if you
// need to create a whole new diff from scatch, such as when you are leaning on
// the provider completely to create the diff.
//
// Note that this does not wipe overrides.
func (d *ResourceDiff) ClearAll() {
d.diff = new(terraform.InstanceDiff)
}
// Clear wipes the diff for a particular key. It is called by SetDiff to remove // Clear wipes the diff for a particular key. It is called by SetDiff to remove
// any possibility of conflicts, but can be called on its own to just remove a // any possibility of conflicts, but can be called on its own to just remove a
// specific key from the diff completely. // specific key from the diff completely.