diff --git a/terraform/graph.go b/terraform/graph.go index 4a1c5f054e..7d72475e29 100644 --- a/terraform/graph.go +++ b/terraform/graph.go @@ -148,7 +148,9 @@ func Graph(opts *GraphOpts) (*depgraph.Graph, error) { graphAddConfigResources(g, config, mod) // Add the modules that are in the configuration. - graphAddConfigModules(g, config, opts) + if err := graphAddConfigModules(g, config, opts); err != nil { + return nil, err + } // Add explicit dependsOn dependencies to the graph graphAddExplicitDeps(g)