mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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:
parent
22220fd0f7
commit
196d7e63fe
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user