github.com/Jae-cisco/terraform@v0.11.12-beta1/terraform/node_root_variable.go (about) 1 package terraform 2 3 import ( 4 "fmt" 5 6 "github.com/hashicorp/terraform/config" 7 ) 8 9 // NodeRootVariable represents a root variable input. 10 type NodeRootVariable struct { 11 Config *config.Variable 12 } 13 14 func (n *NodeRootVariable) Name() string { 15 result := fmt.Sprintf("var.%s", n.Config.Name) 16 return result 17 } 18 19 // GraphNodeReferenceable 20 func (n *NodeRootVariable) ReferenceableName() []string { 21 return []string{n.Name()} 22 }