terraform: no longer check for nil diff as error

This commit is contained in:
Mitchell Hashimoto 2014-10-04 16:47:42 -07:00
parent 5aa62ae635
commit b713f1ac8d
1 changed files with 5 additions and 6 deletions

View File

@ -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