diff --git a/terraform/graph_builder_eval.go b/terraform/graph_builder_eval.go index 21b14351c..31aaf0cfc 100644 --- a/terraform/graph_builder_eval.go +++ b/terraform/graph_builder_eval.go @@ -89,6 +89,13 @@ func (b *EvalGraphBuilder) Steps() []GraphTransformer { // analyze the configuration to find references. &AttachSchemaTransformer{Schemas: b.Schemas, Config: b.Config}, + // Create expansion nodes for all of the module calls. This must + // come after all other transformers that create nodes representing + // objects that can belong to modules. + &ModuleExpansionTransformer{ + Config: b.Config, + }, + // Connect so that the references are ready for targeting. We'll // have to connect again later for providers and so on. &ReferenceTransformer{},