mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
terraform: EncodeDependencies does not encode self dependence
This commit is contained in:
parent
7a2591190b
commit
9c5f2c3061
@ -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?
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user