mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
write updated outputs to the refresh state
If we can evaluate a new output value during plan, write it to the refreshed state as well.
This commit is contained in:
parent
7951b55f88
commit
f222ed7479
@ -230,6 +230,13 @@ func (n *NodeApplyableOutput) Execute(ctx EvalContext, op walkOperation) error {
|
||||
return diags.Err()
|
||||
}
|
||||
n.setValue(state, changes, val)
|
||||
|
||||
// If we were able to evaluate a new value, we can update that in the
|
||||
// refreshed state as well.
|
||||
if state = ctx.RefreshState(); state != nil && val.IsWhollyKnown() {
|
||||
n.setValue(state, changes, val)
|
||||
}
|
||||
|
||||
return nil
|
||||
default:
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user