From 49fee6ba7840f73a6b4be5d3cc5bd81fd04cd8b3 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 4 Jun 2019 22:22:32 -0400 Subject: [PATCH] don't lose private data during destroy Makre sure private data is maintained all the way to destroy. This slipped through, since private data isn't used much for current providers, except for timeouts. --- terraform/eval_diff.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terraform/eval_diff.go b/terraform/eval_diff.go index b7acfb06dc..a28af15e9c 100644 --- a/terraform/eval_diff.go +++ b/terraform/eval_diff.go @@ -448,8 +448,9 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) { // must _also_ record the returned change in the active plan, // which the expression evaluator will use in preference to this // incomplete value recorded in the state. - Status: states.ObjectPlanned, - Value: plannedNewVal, + Status: states.ObjectPlanned, + Value: plannedNewVal, + Private: plannedPrivate, } } @@ -790,6 +791,7 @@ func (n *EvalDiffDestroy) Eval(ctx EvalContext) (interface{}, error) { Before: state.Value, After: cty.NullVal(cty.DynamicPseudoType), }, + Private: state.Private, ProviderAddr: n.ProviderAddr, }