"destroy" outputs too

Ouptuts don't need to be re-evaluated during destroy, since everything
is already in the state, so we can simply remove them.
This commit is contained in:
James Bardin 2017-09-26 18:58:43 -04:00
parent 71e47e56a0
commit c4dd31e62b
1 changed files with 12 additions and 6 deletions

View File

@ -69,17 +69,23 @@ func (n *NodeApplyableOutput) References() []string {
// GraphNodeEvalable
func (n *NodeApplyableOutput) EvalTree() EvalNode {
return &EvalOpFilter{
Ops: []walkOperation{walkRefresh, walkPlan, walkApply,
walkDestroy, walkInput, walkValidate},
Node: &EvalSequence{
Nodes: []EvalNode{
&EvalWriteOutput{
return &EvalSequence{
Nodes: []EvalNode{
&EvalOpFilter{
Ops: []walkOperation{walkRefresh, walkPlan, walkApply,
walkInput, walkValidate},
Node: &EvalWriteOutput{
Name: n.Config.Name,
Sensitive: n.Config.Sensitive,
Value: n.Config.RawConfig,
},
},
&EvalOpFilter{
Ops: []walkOperation{walkDestroy, walkPlanDestroy},
Node: &EvalDeleteOutput{
Name: n.Config.Name,
},
},
},
}
}