terraform: do the transitive reduction as part of the graph builder

This commit is contained in:
Mitchell Hashimoto 2015-02-27 19:23:20 -08:00
parent 903e49162d
commit 9eb7ebbddd
2 changed files with 4 additions and 3 deletions

View File

@ -109,5 +109,9 @@ func (b *BuiltinGraphBuilder) Steps() []GraphTransformer {
// Make sure we create one root // Make sure we create one root
&RootTransformer{}, &RootTransformer{},
// Perform the transitive reduction to make our graph a bit
// more sane if possible (it usually is possible).
&TransitiveReductionTransformer{},
} }
} }

View File

@ -125,14 +125,11 @@ const testBasicGraphBuilderStr = `
const testBuiltinGraphBuilderBasicStr = ` const testBuiltinGraphBuilderBasicStr = `
aws_instance.db aws_instance.db
aws_instance.db (destroy tainted) aws_instance.db (destroy tainted)
provider.aws
aws_instance.db (destroy tainted) aws_instance.db (destroy tainted)
aws_instance.web (destroy tainted) aws_instance.web (destroy tainted)
provider.aws
aws_instance.web aws_instance.web
aws_instance.db aws_instance.db
aws_instance.web (destroy tainted) aws_instance.web (destroy tainted)
provider.aws
aws_instance.web (destroy tainted) aws_instance.web (destroy tainted)
provider.aws provider.aws
provider.aws provider.aws