opentofu/terraform/node_root_variable.go

23 lines
415 B
Go
Raw Normal View History

2016-09-16 16:36:35 -05:00
package terraform
import (
"fmt"
"github.com/hashicorp/terraform/config"
)
// NodeRootVariable represents a root variable input.
type NodeRootVariable struct {
Config *config.Variable
}
func (n *NodeRootVariable) Name() string {
result := fmt.Sprintf("var.%s", n.Config.Name)
return result
}
// GraphNodeReferenceable
func (n *NodeRootVariable) ReferenceableName() []string {
return []string{n.Name()}
}