terraform: EncodeDependencies does not encode self dependence

This commit is contained in:
Armon Dadgar 2014-09-17 17:57:41 -07:00
parent 7a2591190b
commit 9c5f2c3061
1 changed files with 3 additions and 0 deletions

View File

@ -195,6 +195,9 @@ func EncodeDependencies(g *depgraph.Graph) {
for _, dep := range n.Deps { for _, dep := range n.Deps {
switch target := dep.Target.Meta.(type) { switch target := dep.Target.Meta.(type) {
case *GraphNodeResource: case *GraphNodeResource:
if target.Resource.Id == rs.Id {
continue
}
inject = append(inject, target.Resource.Id) inject = append(inject, target.Resource.Id)
// TODO: case *GraphNodeResourceMeta? // TODO: case *GraphNodeResourceMeta?
} }