core: move close transforms after flatten and destroy transforms

fixes destroy-related failures introduced by the close transforms
This commit is contained in:
Paul Hinze 2015-06-29 12:40:20 -05:00
parent d6f7261190
commit 557b299c4b
1 changed files with 4 additions and 2 deletions

View File

@ -117,12 +117,10 @@ func (b *BuiltinGraphBuilder) Steps(path []string) []GraphTransformer {
&MissingProviderTransformer{Providers: b.Providers},
&ProviderTransformer{},
&DisableProviderTransformer{},
&CloseProviderTransformer{},
// Provisioner-related transformations
&MissingProvisionerTransformer{Provisioners: b.Provisioners},
&ProvisionerTransformer{},
&CloseProvisionerTransformer{},
// Run our vertex-level transforms
&VertexTransformer{
@ -166,6 +164,10 @@ func (b *BuiltinGraphBuilder) Steps(path []string) []GraphTransformer {
Then: &PruneDestroyTransformer{Diff: b.Diff, State: b.State},
}),
// Insert nodes to close opened plugin connections
&CloseProviderTransformer{},
&CloseProvisionerTransformer{},
// Make sure we have a single root after the above changes.
// This is the 2nd root transformer. In practice this shouldn't
// actually matter as the RootTransformer is idempotent.