use value without deprecations after validating

This commit is contained in:
Daniel Schmidt 2026-01-20 20:23:31 +01:00
parent 5ee1bece21
commit c02223e94c

View file

@ -329,7 +329,7 @@ func (ev *forEachEvaluator) validateResourceOrActionForEach(forEachVal cty.Value
}
// We don't care about the returned value here, only the diagnostics
_, deprecationDiags := ev.ctx.Deprecations().Validate(forEachVal, ev.ctx.Path().Module(), ev.expr.Range().Ptr())
forEachVal, deprecationDiags := ev.ctx.Deprecations().Validate(forEachVal, ev.ctx.Path().Module(), ev.expr.Range().Ptr())
diags = diags.Append(deprecationDiags)