reduce module instances refs to the module call

There aren't going to be any nodes specifically for module call
instances during plan, so we have to switch the reference subject to the
general module call.
This commit is contained in:
James Bardin 2020-06-15 20:46:53 -04:00
parent d6ca469124
commit 7154c61f0b
1 changed files with 2 additions and 0 deletions

View File

@ -303,6 +303,8 @@ func (m ReferenceMap) References(v dag.Vertex) []dag.Vertex {
subject = ri.ContainingResource() subject = ri.ContainingResource()
case addrs.AbsModuleCallOutput: case addrs.AbsModuleCallOutput:
subject = ri.ModuleCallOutput() subject = ri.ModuleCallOutput()
case addrs.ModuleCallInstance:
subject = ri.Call
default: default:
log.Printf("[WARN] ReferenceTransformer: reference not found: %q", subject) log.Printf("[WARN] ReferenceTransformer: reference not found: %q", subject)
continue continue