terraform: remove flatten, forever

This commit is contained in:
Mitchell Hashimoto 2017-01-26 21:03:27 -08:00
parent 6d731b3b46
commit 2beb62c92b
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 0 additions and 33 deletions

View File

@ -1,21 +0,0 @@
package terraform
import (
"github.com/hashicorp/terraform/dag"
)
// GraphNodeFlatGraph must be implemented by nodes that have subgraphs
// that they want flattened into the graph.
type GraphNodeFlatGraph interface {
FlattenGraph() *Graph
}
// GraphNodeFlattenable must be implemented by all nodes that can be
// flattened. If a FlattenGraph returns any nodes that can't be flattened,
// it will be an error.
//
// If Flatten returns nil for the Vertex along with a nil error, it will
// removed from the graph.
type GraphNodeFlattenable interface {
Flatten(path []string) (dag.Vertex, error)
}

View File

@ -111,18 +111,6 @@ func (t *MissingProvisionerTransformer) Transform(g *Graph) error {
NameValue: p,
PathValue: path,
}
if len(path) > 0 {
// If we have a path, we do the flattening immediately. This
// is to support new-style graph nodes that are already
// flattened.
if fn, ok := newV.(GraphNodeFlattenable); ok {
var err error
newV, err = fn.Flatten(path)
if err != nil {
return err
}
}
}
// Add the missing provisioner node to the graph
m[key] = g.Add(newV)