From c9d6f82ac552cddd715343f8bdd61f1bcbe55fcb Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 21 Nov 2022 11:04:21 -0500 Subject: [PATCH] don't re-set changes for refreshed outputs When output values are updated in the refreshed state, we don't need to re-set the changes which were already set in conjunction with the current state. --- internal/terraform/node_output.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/terraform/node_output.go b/internal/terraform/node_output.go index 1079a59df36f..eccf780cb2ea 100644 --- a/internal/terraform/node_output.go +++ b/internal/terraform/node_output.go @@ -400,7 +400,8 @@ If you do intend to export this data, annotate the output value as sensitive by // 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) + // we only need to update the state, do not pass in the changes again + n.setValue(state, nil, val) } return diags