make outptut destroy nodes a temporaryValue

These never need to be pruned, except in the case of adding output
changes to a targeted graph.
This commit is contained in:
James Bardin 2020-06-24 10:22:10 -04:00
parent 308eb5f47f
commit 504b49b1d3

View File

@ -270,6 +270,11 @@ func (n *NodeDestroyableOutput) ModulePath() addrs.Module {
return n.Addr.Module.Module() return n.Addr.Module.Module()
} }
func (n *NodeDestroyableOutput) temporaryValue() bool {
// this must always be evaluated if it is a root module output
return !n.Addr.Module.IsRoot()
}
// RemovableIfNotTargeted // RemovableIfNotTargeted
func (n *NodeDestroyableOutput) RemoveIfNotTargeted() bool { func (n *NodeDestroyableOutput) RemoveIfNotTargeted() bool {
// We need to add this so that this node will be removed if // We need to add this so that this node will be removed if