diff --git a/terraform/graph_config_node_module.go b/terraform/graph_config_node_module.go index 8a6b522019..a93904cba7 100644 --- a/terraform/graph_config_node_module.go +++ b/terraform/graph_config_node_module.go @@ -56,14 +56,6 @@ func (n *GraphNodeConfigModule) Expand(b GraphBuilder) (GraphNodeSubgraph, error return nil, err } - { - // Add the destroy marker to the graph - t := &ModuleDestroyTransformerOld{} - if err := t.Transform(graph); err != nil { - return nil, err - } - } - // Build the actual subgraph node return &graphNodeModuleExpanded{ Original: n, diff --git a/terraform/graph_config_node_module_test.go b/terraform/graph_config_node_module_test.go index 6aeacf7882..b87a9f13c4 100644 --- a/terraform/graph_config_node_module_test.go +++ b/terraform/graph_config_node_module_test.go @@ -71,10 +71,8 @@ const testGraphNodeModuleExpandStr = ` aws_instance.bar aws_instance.foo aws_instance.foo -plan-destroy ` const testGraphNodeModuleExpandFlattenStr = ` aws_instance.foo -plan-destroy ` diff --git a/terraform/transform_module_destroy_old.go b/terraform/transform_module_destroy_old.go deleted file mode 100644 index e971838f1c..0000000000 --- a/terraform/transform_module_destroy_old.go +++ /dev/null @@ -1,62 +0,0 @@ -package terraform - -import ( - "fmt" - - "github.com/hashicorp/terraform/dag" -) - -// ModuleDestroyTransformer is a GraphTransformer that adds a node -// to the graph that will just mark the full module for destroy in -// the destroy scenario. -type ModuleDestroyTransformerOld struct{} - -func (t *ModuleDestroyTransformerOld) Transform(g *Graph) error { - // Create the node - n := &graphNodeModuleDestroy{Path: g.Path} - - // Add it to the graph. We don't need any edges because - // it can happen whenever. - g.Add(n) - - return nil -} - -type graphNodeModuleDestroy struct { - Path []string -} - -func (n *graphNodeModuleDestroy) Name() string { - return "plan-destroy" -} - -// GraphNodeEvalable impl. -func (n *graphNodeModuleDestroy) EvalTree() EvalNode { - return &EvalOpFilter{ - Ops: []walkOperation{walkPlanDestroy}, - Node: &EvalDiffDestroyModule{Path: n.Path}, - } -} - -// GraphNodeFlattenable impl. -func (n *graphNodeModuleDestroy) Flatten(p []string) (dag.Vertex, error) { - return &graphNodeModuleDestroyFlat{ - graphNodeModuleDestroy: n, - PathValue: p, - }, nil -} - -type graphNodeModuleDestroyFlat struct { - *graphNodeModuleDestroy - - PathValue []string -} - -func (n *graphNodeModuleDestroyFlat) Name() string { - return fmt.Sprintf( - "%s.%s", modulePrefixStr(n.PathValue), n.graphNodeModuleDestroy.Name()) -} - -func (n *graphNodeModuleDestroyFlat) Path() []string { - return n.PathValue -}