terraform: state module orphans should only return direct
This commit is contained in:
parent
392f56101c
commit
955bbbba41
|
@ -145,7 +145,7 @@ func (s *State) ModuleOrphans(path []string, c *config.Config) [][]string {
|
|||
}
|
||||
|
||||
// If we have the direct child, then just skip it.
|
||||
key := m.Path[len(m.Path)-2]
|
||||
key := m.Path[len(path)]
|
||||
if _, ok := direct[key]; ok {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue