mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 08:51:02 -06:00
make sure to get a ResourceAddr for destroy refs
addr.Resource is sometimes a resource, except when it's an instance. Make sure to always get the underlying resource.
This commit is contained in:
parent
c47f100e56
commit
8510aa81ca
@ -81,7 +81,7 @@ func (t *DestroyEdgeTransformer) Transform(g *Graph) error {
|
||||
destroyers[key] = append(destroyers[key], n)
|
||||
destroyerAddrs[key] = addr
|
||||
|
||||
resAddr := addr.Resource.Absolute(addr.Module).String()
|
||||
resAddr := addr.Resource.Resource.Absolute(addr.Module).String()
|
||||
destroyersByResource[resAddr] = append(destroyersByResource[resAddr], n)
|
||||
case GraphNodeCreator:
|
||||
addr := n.CreateAddr()
|
||||
|
Loading…
Reference in New Issue
Block a user