diff --git a/terraform/graph_builder.go b/terraform/graph_builder.go index e70d58752..6368e54dc 100644 --- a/terraform/graph_builder.go +++ b/terraform/graph_builder.go @@ -109,5 +109,9 @@ func (b *BuiltinGraphBuilder) Steps() []GraphTransformer { // Make sure we create one root &RootTransformer{}, + + // Perform the transitive reduction to make our graph a bit + // more sane if possible (it usually is possible). + &TransitiveReductionTransformer{}, } } diff --git a/terraform/graph_builder_test.go b/terraform/graph_builder_test.go index ee1dbc1f5..882d054b9 100644 --- a/terraform/graph_builder_test.go +++ b/terraform/graph_builder_test.go @@ -125,14 +125,11 @@ const testBasicGraphBuilderStr = ` const testBuiltinGraphBuilderBasicStr = ` aws_instance.db aws_instance.db (destroy tainted) - provider.aws aws_instance.db (destroy tainted) aws_instance.web (destroy tainted) - provider.aws aws_instance.web aws_instance.db aws_instance.web (destroy tainted) - provider.aws aws_instance.web (destroy tainted) provider.aws provider.aws