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.
pull/19086/head
James Bardin 8 years ago committed by Martin Atkins
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…
Cancel
Save