make the module closer referenceable
This is all that is required to make module reference ordering work during apply, by adding and edge to the nodeCloseModule node, which will be the last node evaluated in the module.
This commit is contained in:
parent
3ac0410fe2
commit
b1532c0f04
|
@ -99,6 +99,23 @@ type nodeCloseModule struct {
|
|||
Addr addrs.Module
|
||||
}
|
||||
|
||||
var (
|
||||
_ graphNodeModuleCloser = (*nodeCloseModule)(nil)
|
||||
_ GraphNodeReferenceable = (*nodeCloseModule)(nil)
|
||||
)
|
||||
|
||||
func (n *nodeCloseModule) ModulePath() addrs.Module {
|
||||
mod, _ := n.Addr.Call()
|
||||
return mod
|
||||
}
|
||||
|
||||
func (n *nodeCloseModule) ReferenceableAddrs() []addrs.Referenceable {
|
||||
_, call := n.Addr.Call()
|
||||
return []addrs.Referenceable{
|
||||
call,
|
||||
}
|
||||
}
|
||||
|
||||
func (n *nodeCloseModule) Name() string {
|
||||
if len(n.Addr) == 0 {
|
||||
return "root"
|
||||
|
|
Loading…
Reference in New Issue