terraform: clarify comment

This commit is contained in:
Mitchell Hashimoto 2015-07-20 08:54:42 -07:00
parent 4d361c839e
commit 696d5ef94f
1 changed files with 5 additions and 2 deletions

View File

@ -256,12 +256,15 @@ func (n *GraphNodeConfigResource) Noop(opts *NoopOpts) bool {
return false
}
// If there is no diff, then we aren't a noop
// If there is no diff, then we aren't a noop since something needs to
// be done (such as a plan). We only check if we're a noop in a diff.
if opts.Diff == nil || opts.Diff.Empty() {
return false
}
// If we have no module diff, we're certainly a noop
// If we have no module diff, we're certainly a noop. This is because
// it means there is a diff, and that the module we're in just isn't
// in it, meaning we're not doing anything.
if opts.ModDiff == nil || opts.ModDiff.Empty() {
return true
}