restore the ordering of nested modules
In order for depends_on to work, modules need to implicitly depend on their child modules. This will have little effect on terraform's concurrency, as configuration trees are always much wider than they are deep.
This commit is contained in:
parent
63b54f2b72
commit
7122b271f9
|
@ -60,6 +60,16 @@ func (t *ModuleExpansionTransformer) Transform(g *Graph) error {
|
|||
}
|
||||
}
|
||||
|
||||
// Modules implicitly depend on their child modules, so connect closers to
|
||||
// other which contain their path.
|
||||
for _, c := range t.closers {
|
||||
for _, d := range t.closers {
|
||||
if len(d.Addr) > len(c.Addr) && c.Addr.Equal(d.Addr[:len(c.Addr)]) {
|
||||
g.Connect(dag.BasicEdge(c, d))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue