6 "github.com/hashicorp/terraform/configs"
7 "github.com/hashicorp/terraform/states"
10 // RemovedModuleTransformer implements GraphTransformer to add nodes indicating
11 // when a module was removed from the configuration.
12 type RemovedModuleTransformer struct {
13 Config *configs.Config // root node in the config tree
17 func (t *RemovedModuleTransformer) Transform(g *Graph) error {
18 // nothing to remove if there's no state!
23 for _, m := range t.State.Modules {
24 cc := t.Config.DescendentForInstance(m.Addr)
29 log.Printf("[DEBUG] %s is no longer in configuration\n", m.Addr)
30 g.Add(&NodeModuleRemoved{Addr: m.Addr})