github.com/ibm-cloud/terraform@v0.6.4-0.20170726051544-8872b87621df/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 }