6 "github.com/hashicorp/terraform/config"
9 // varNameForVar returns the VarName value for an interpolated variable.
10 // This value is compared to the VarName() value for the nodes within the
11 // graph to build the graph edges.
12 func varNameForVar(raw config.InterpolatedVariable) string {
13 switch v := raw.(type) {
14 case *config.ModuleVariable:
15 return fmt.Sprintf("module.%s.output.%s", v.Name, v.Field)
16 case *config.ResourceVariable:
18 case *config.UserVariable:
19 return fmt.Sprintf("var.%s", v.Name)