From c4dd31e62bfec81c26c2d97f424072d91f261cf5 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 26 Sep 2017 18:58:43 -0400 Subject: [PATCH] "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. --- terraform/node_output.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/terraform/node_output.go b/terraform/node_output.go index 9017a63c4..d3281c346 100644 --- a/terraform/node_output.go +++ b/terraform/node_output.go @@ -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, + }, + }, }, } }