Modifications to eval_diff
This commit is contained in:
parent
bc55b6a28b
commit
e9d9205ce8
|
@ -146,7 +146,6 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
||||||
// necessary
|
// necessary
|
||||||
unmarkedConfigVal := configVal
|
unmarkedConfigVal := configVal
|
||||||
var unmarkedPaths []cty.PathValueMarks
|
var unmarkedPaths []cty.PathValueMarks
|
||||||
// var marks cty.ValueMarks
|
|
||||||
if configVal.ContainsMarked() {
|
if configVal.ContainsMarked() {
|
||||||
// store the marked values so we can re-mark them later after
|
// store the marked values so we can re-mark them later after
|
||||||
// we've sent things over the wire. Right now this stores
|
// we've sent things over the wire. Right now this stores
|
||||||
|
@ -250,8 +249,9 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
||||||
plannedNewVal := resp.PlannedState
|
plannedNewVal := resp.PlannedState
|
||||||
|
|
||||||
// Add the marks back to the planned new value
|
// Add the marks back to the planned new value
|
||||||
|
markedPlannedNewVal := plannedNewVal
|
||||||
if configVal.ContainsMarked() {
|
if configVal.ContainsMarked() {
|
||||||
plannedNewVal = plannedNewVal.MarkWithPaths(unmarkedPaths)
|
markedPlannedNewVal = plannedNewVal.MarkWithPaths(unmarkedPaths)
|
||||||
}
|
}
|
||||||
|
|
||||||
plannedPrivate := resp.PlannedPrivate
|
plannedPrivate := resp.PlannedPrivate
|
||||||
|
@ -499,7 +499,10 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
||||||
Change: plans.Change{
|
Change: plans.Change{
|
||||||
Action: action,
|
Action: action,
|
||||||
Before: priorVal,
|
Before: priorVal,
|
||||||
After: plannedNewVal,
|
// Pass the marked value through in our change
|
||||||
|
// to propogate through evaluation.
|
||||||
|
// Marks will be removed when encoding.
|
||||||
|
After: markedPlannedNewVal,
|
||||||
},
|
},
|
||||||
RequiredReplace: reqRep,
|
RequiredReplace: reqRep,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue