mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
destroy nodes can't be referenced directly
Destroy nodes were being referenced by their regular paths, which was causing cycles in the graphs. Destroy nodes can't be referenced directly in any way, so override the inherited method for a referenceable address.
This commit is contained in:
parent
7137d85522
commit
f8b77030db
@ -71,6 +71,12 @@ func (n *NodeDestroyResourceInstance) ReferenceableName() []addrs.Referenceable
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy nodes can't be directly referenced by anything, so we need to
|
||||
// override the abstract method.
|
||||
func (n *NodeDestroyResourceInstance) ReferenceableAddrs() []addrs.Referenceable {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GraphNodeReferencer, overriding NodeAbstractResource
|
||||
func (n *NodeDestroyResourceInstance) References() []*addrs.Reference {
|
||||
// If we have a config, then we need to include destroy-time dependencies
|
||||
|
Loading…
Reference in New Issue
Block a user