command/apply: add additional nil check to loading state for outputs
This commit is contained in:
parent
83e3fa2a33
commit
6c801d0386
|
@ -430,7 +430,12 @@ func outputsAsString(state *terraform.State, modPath []string, schema []*config.
|
|||
return ""
|
||||
}
|
||||
|
||||
outputs := state.ModuleByPath(modPath).Outputs
|
||||
ms := state.ModuleByPath(modPath)
|
||||
if ms == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
outputs := ms.Outputs
|
||||
outputBuf := new(bytes.Buffer)
|
||||
if len(outputs) > 0 {
|
||||
schemaMap := make(map[string]*config.Output)
|
||||
|
|
Loading…
Reference in New Issue