|
|
|
|
@ -279,11 +279,6 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
|
|
|
|
panic(fmt.Sprintf("PlanResourceChange of %s produced nil value", absAddr.String()))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add the marks back to the planned new value
|
|
|
|
|
if len(unmarkedPaths) > 0 {
|
|
|
|
|
plannedNewVal = plannedNewVal.MarkWithPaths(unmarkedPaths)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// We allow the planned new value to disagree with configuration _values_
|
|
|
|
|
// here, since that allows the provider to do special logic like a
|
|
|
|
|
// DiffSuppressFunc, but we still require that the provider produces
|
|
|
|
|
@ -302,7 +297,7 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
|
|
|
|
return nil, diags.Err()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if errs := objchange.AssertPlanValid(schema, priorVal, configValIgnored, plannedNewVal); len(errs) > 0 {
|
|
|
|
|
if errs := objchange.AssertPlanValid(schema, unmarkedPriorVal, unmarkedConfigVal, plannedNewVal); len(errs) > 0 {
|
|
|
|
|
if resp.LegacyTypeSystem {
|
|
|
|
|
// The shimming of the old type system in the legacy SDK is not precise
|
|
|
|
|
// enough to pass this consistency check, so we'll give it a pass here,
|
|
|
|
|
@ -333,6 +328,13 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add the marks back to the planned new value -- this must happen after ignore changes
|
|
|
|
|
// have been processed
|
|
|
|
|
unmarkedPlannedNewVal := plannedNewVal
|
|
|
|
|
if len(unmarkedPaths) > 0 {
|
|
|
|
|
plannedNewVal = plannedNewVal.MarkWithPaths(unmarkedPaths)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The provider produces a list of paths to attributes whose changes mean
|
|
|
|
|
// that we must replace rather than update an existing remote object.
|
|
|
|
|
// However, we only need to do that if the identified attributes _have_
|
|
|
|
|
@ -395,7 +397,6 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
|
|
|
|
|
|
|
|
|
|
// Unmark for this test for equality. If only sensitivity has changed,
|
|
|
|
|
// this does not require an Update or Replace
|
|
|
|
|
unmarkedPlannedNewVal, _ := plannedNewVal.UnmarkDeep()
|
|
|
|
|
eqV := unmarkedPlannedNewVal.Equals(unmarkedPriorVal)
|
|
|
|
|
eq := eqV.IsKnown() && eqV.True()
|
|
|
|
|
|
|
|
|
|
|