4 "github.com/hashicorp/terraform/addrs"
5 "github.com/hashicorp/terraform/configs"
6 "github.com/hashicorp/terraform/dag"
9 // NodeRootVariable represents a root variable input.
10 type NodeRootVariable struct {
11 Addr addrs.InputVariable
12 Config *configs.Variable
16 _ GraphNodeSubPath = (*NodeRootVariable)(nil)
17 _ GraphNodeReferenceable = (*NodeRootVariable)(nil)
18 _ dag.GraphNodeDotter = (*NodeApplyableModuleVariable)(nil)
21 func (n *NodeRootVariable) Name() string {
22 return n.Addr.String()
26 func (n *NodeRootVariable) Path() addrs.ModuleInstance {
27 return addrs.RootModuleInstance
30 // GraphNodeReferenceable
31 func (n *NodeRootVariable) ReferenceableAddrs() []addrs.Referenceable {
32 return []addrs.Referenceable{n.Addr}
35 // dag.GraphNodeDotter impl.
36 func (n *NodeRootVariable) DotNode(name string, opts *dag.DotOpts) *dag.DotNode {
39 Attrs: map[string]string{