From b713f1ac8da198b6e51f597dded21a9f5628230e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 4 Oct 2014 16:47:42 -0700 Subject: [PATCH] terraform: no longer check for nil diff as error --- terraform/context.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/terraform/context.go b/terraform/context.go index 132a9f48d..146152a0e 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -634,13 +634,12 @@ func (c *walkContext) applyWalkFn() depgraph.WalkFunc { return err } - // This should never happen because we check if Diff.Empty above. - // If this happened, then the diff above returned a bad diff. + // This can happen if we aren't actually applying anything + // except an ID (the "null" provider). It is not really an issue + // since the Same check later down will catch any real problems. if diff == nil { - return fmt.Errorf( - "%s: diff became nil during Apply. This is a bug with "+ - "the resource provider. Please report a bug.", - r.Id) + diff = new(InstanceDiff) + diff.init() } // Delete id from the diff because it is dependent on