Skip to content

Commit

Permalink
don't lose private data during destroy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jbardin committed Jun 5, 2019
1 parent 32a627e commit 86405f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions terraform/eval_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down Expand Up @@ -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,
}

Expand Down

0 comments on commit 86405f1

Please sign in to comment.