diff --git a/config/config.go b/config/config.go index 87145828a..9cf957f52 100644 --- a/config/config.go +++ b/config/config.go @@ -9,10 +9,6 @@ import ( "github.com/hashicorp/terraform/depgraph" ) -// GraphRoot is the name of the resource graph root that should be -// ignored since it doesn't map to an exact resource. -const GraphRoot = "root" - // Config is the configuration that comes from loading a collection // of Terraform templates. type Config struct { @@ -207,7 +203,7 @@ func (c *Config) Graph() *depgraph.Graph { } // Create a root that just depends on everything else finishing. - root := &depgraph.Noun{Name: GraphRoot} + root := &depgraph.Noun{Name: "root"} for _, n := range nounsList { root.Deps = append(root.Deps, &depgraph.Dependency{ Name: n.Name, diff --git a/terraform/terraform.go b/terraform/terraform.go index 6c1b5b783..1b3f6c214 100644 --- a/terraform/terraform.go +++ b/terraform/terraform.go @@ -107,7 +107,7 @@ func (t *Terraform) diffWalkFn( return func(n *depgraph.Noun) error { // If it is the root node, ignore - if n.Name == config.GraphRoot { + if n.Meta == nil { return nil }