Skip to content

Commit 6a7d3a1

Browse files
author
The Terraform Team
authored
Merge efd7715 into backport/jbardin/noop-apply-optimizations/loudly-choice-squirrel
2 parents 184afe4 + efd7715 commit 6a7d3a1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

internal/terraform/node_resource_apply_instance.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (n *NodeApplyableResourceInstance) managedResourceExecute(ctx EvalContext)
271271

272272
// Make a new diff, in case we've learned new values in the state
273273
// during apply which we can now incorporate.
274-
diffApply, _, _, planDiags := n.plan(ctx, diff, state, false, n.forceReplace)
274+
diffApply, _, repeatData, planDiags := n.plan(ctx, diff, state, false, n.forceReplace)
275275
diags = diags.Append(planDiags)
276276
if diags.HasErrors() {
277277
return diags
@@ -296,12 +296,6 @@ func (n *NodeApplyableResourceInstance) managedResourceExecute(ctx EvalContext)
296296
return diags
297297
}
298298

299-
var repeatData instances.RepetitionData
300-
if n.Config != nil {
301-
forEach, _ := evaluateForEachExpression(n.Config.ForEach, ctx)
302-
repeatData = EvalDataForInstanceKey(n.ResourceInstanceAddr().Resource.Key, forEach)
303-
}
304-
305299
// If there is no change, there was nothing to apply, and we don't need to
306300
// re-write the state, but we do need to re-evaluate postconditions.
307301
if diffApply.Action == plans.NoOp {

0 commit comments

Comments
 (0)