mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
use key data from plan method for apply
This commit is contained in:
parent
ffe2e3935e
commit
efd77159dd
@ -271,7 +271,7 @@ func (n *NodeApplyableResourceInstance) managedResourceExecute(ctx EvalContext)
|
||||
|
||||
// Make a new diff, in case we've learned new values in the state
|
||||
// during apply which we can now incorporate.
|
||||
diffApply, _, _, planDiags := n.plan(ctx, diff, state, false, n.forceReplace)
|
||||
diffApply, _, repeatData, planDiags := n.plan(ctx, diff, state, false, n.forceReplace)
|
||||
diags = diags.Append(planDiags)
|
||||
if diags.HasErrors() {
|
||||
return diags
|
||||
@ -296,12 +296,6 @@ func (n *NodeApplyableResourceInstance) managedResourceExecute(ctx EvalContext)
|
||||
return diags
|
||||
}
|
||||
|
||||
var repeatData instances.RepetitionData
|
||||
if n.Config != nil {
|
||||
forEach, _ := evaluateForEachExpression(n.Config.ForEach, ctx)
|
||||
repeatData = EvalDataForInstanceKey(n.ResourceInstanceAddr().Resource.Key, forEach)
|
||||
}
|
||||
|
||||
// If there is no change, there was nothing to apply, and we don't need to
|
||||
// re-write the state, but we do need to re-evaluate postconditions.
|
||||
if diffApply.Action == plans.NoOp {
|
||||
|
Loading…
Reference in New Issue
Block a user