You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a `DiffEqualDecisionOverride` to the shim layer which allows
provider implementations to specify a diff decision instead of relying
on the shim layer to do that.
Also adds a `DiffEqualDecisionOverride` to the PRC sdkv2 implementation
which opentofu does.
Also adds a feature flag `EnableAccurateBridgePreview` which guards this
feature.
will fix once rolled out:
#2293
will fix once rolled out:
#1501
will undo once rolled out:
#1502 as the
underlying issue was fixed during the PRC work.
Stacked on #2380
// Taken from https://github.com/opentofu/opentofu/blob/864aa9d1d629090cfc4ddf9fdd344d34dee9793e/internal/tofu/node_resource_abstract_instance.go#L1024
280
+
// We need to unmark the values to make sure Equals works.
281
+
// Equals will return unknown if either value is unknown.
282
+
// START
283
+
unmarkedPrior, _:=st.UnmarkDeep()
284
+
unmarkedPlan, _:=plannedState.UnmarkDeep()
285
+
eqV:=unmarkedPrior.Equals(unmarkedPlan)
286
+
eq:=eqV.IsKnown() &&eqV.True()
287
+
// END
288
+
289
+
diffOverride:=shim.DiffOverrideUpdate
290
+
ifeq {
291
+
diffOverride=shim.DiffOverrideNoUpdate
292
+
}
293
+
272
294
return&v2InstanceDiff2{
273
295
v2InstanceDiff: v2InstanceDiff{
274
296
tf: plan.PlannedDiff,
275
297
},
276
-
config: cfg,
277
-
plannedState: plannedState,
278
-
plannedPrivate: plan.PlannedPrivate,
298
+
config: cfg,
299
+
plannedState: plannedState,
300
+
diffEqualDecisionOverride: diffOverride,
301
+
plannedPrivate: plan.PlannedPrivate,
279
302
}, err
280
303
}
281
304
@@ -507,7 +530,8 @@ func (s *grpcServer) PlanResourceChange(
0 commit comments