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 return err
} }
// This should never happen because we check if Diff.Empty above. // This can happen if we aren't actually applying anything
// If this happened, then the diff above returned a bad diff. // 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 { if diff == nil {
return fmt.Errorf( diff = new(InstanceDiff)
"%s: diff became nil during Apply. This is a bug with "+ diff.init()
"the resource provider. Please report a bug.",
r.Id)
} }
// Delete id from the diff because it is dependent on // Delete id from the diff because it is dependent on