mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
521bdcc241
GraphNodeModulePath is similar to GraphNodeSubPath, except that it returns an addrs.Module rather than an addrs.ModuleInstance. This is used by the ReferenceTransformer to connect references, when modules may not yet be expanded. Because references only exist within the scope of a module, we can connect everything knowing only the module path. If the reference is to an expanded module instance output, we can still properly order the reference because we'll wait for the entire module to complete evaluation.
18 lines
462 B
Go
18 lines
462 B
Go
package terraform
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/addrs"
|
|
)
|
|
|
|
// GraphNodeSubPath says that a node is part of a graph with a
|
|
// different path, and the context should be adjusted accordingly.
|
|
type GraphNodeSubPath interface {
|
|
Path() addrs.ModuleInstance
|
|
}
|
|
|
|
// GraphNodeModulePath is implemented by all referenceable nodes, to indicate
|
|
// their configuration path in unexpanded modules.
|
|
type GraphNodeModulePath interface {
|
|
ModulePath() addrs.Module
|
|
}
|