run RemovedModuleTransformer before References

Also add RemovedModuleTransformer to the plan graph for parity.
This commit is contained in:
James Bardin 2017-11-09 10:34:56 -05:00
parent 3916f3a5a3
commit 7e4dcdb9f0
2 changed files with 6 additions and 3 deletions

View File

@ -113,6 +113,9 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer {
// Add module variables
&ModuleVariableTransformer{Module: b.Module},
// Remove modules no longer present in the config
&RemovedModuleTransformer{Module: b.Module, State: b.State},
// Connect references so ordering is correct
&ReferenceTransformer{},
@ -133,9 +136,6 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer {
&CloseProviderTransformer{},
&CloseProvisionerTransformer{},
// Remove modules no longer present in the config
&RemovedModuleTransformer{Module: b.Module, State: b.State},
// Single root
&RootTransformer{},
}

View File

@ -115,6 +115,9 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
Module: b.Module,
},
// Remove modules no longer present in the config
&RemovedModuleTransformer{Module: b.Module, State: b.State},
// Connect so that the references are ready for targeting. We'll
// have to connect again later for providers and so on.
&ReferenceTransformer{},