github.com/paybyphone/terraform@v0.9.5-0.20170613192930-9706042ddd51/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 }