From 196d7e63fe23322ba412912d4cf5c1da29484008 Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Sat, 27 May 2017 18:19:56 -0700 Subject: [PATCH] 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. --- helper/schema/resource_diff.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/helper/schema/resource_diff.go b/helper/schema/resource_diff.go index 7f47748b30..cfc36f271f 100644 --- a/helper/schema/resource_diff.go +++ b/helper/schema/resource_diff.go @@ -206,15 +206,6 @@ func (d *ResourceDiff) UpdatedKeys() []string { 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 // any possibility of conflicts, but can be called on its own to just remove a // specific key from the diff completely.