backend/local: allow nil modules (no config) if executing a plan

This commit is contained in:
Mitchell Hashimoto 2017-02-16 10:56:39 -08:00
parent 1480d0c5b8
commit d443bf1b56
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func (b *Local) opApply(
// If we have a nil module at this point, then set it to an empty tree
// to avoid any potential crashes.
if op.Module == nil && !op.Destroy {
if op.Plan == nil && op.Module == nil && !op.Destroy {
runningOp.Err = fmt.Errorf(strings.TrimSpace(applyErrNoConfig))
return
}