terraform/internal/states
Varun Chawla a5aa6cc5b7
states: fix RootOutputValuesEqual comparing s2 to itself (#38181)
* states: fix RootOutputValuesEqual comparing s2 to itself

RootOutputValuesEqual had a copy-paste bug where it iterated over
s2.RootOutputValues instead of s.RootOutputValues, effectively
comparing s2 against itself rather than comparing the receiver (s)
against the argument (s2). This meant the function would always
return true as long as both states had the same number of output
values, regardless of whether the actual values differed.

This bug was introduced in #37886 and affects refresh-only plan mode,
where RootOutputValuesEqual is used to determine if root output values
changed during refresh, which controls whether the plan is considered
applyable.

* add changelog entry for RootOutputValuesEqual fix

* Update changelog wording per reviewer suggestion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:15:37 +00:00
..
remote make copyrightfix 2026-02-17 13:56:34 +00:00
statefile make copyrightfix 2026-02-17 13:56:34 +00:00
statemgr make copyrightfix 2026-02-17 13:56:34 +00:00
checks.go make copyrightfix 2026-02-17 13:56:34 +00:00
doc.go make copyrightfix 2026-02-17 13:56:34 +00:00
instance_object.go make copyrightfix 2026-02-17 13:56:34 +00:00
instance_object_src.go make copyrightfix 2026-02-17 13:56:34 +00:00
instance_object_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
module.go make copyrightfix 2026-02-17 13:56:34 +00:00
objectstatus_string.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
output_value.go make copyrightfix 2026-02-17 13:56:34 +00:00
resource.go make copyrightfix 2026-02-17 13:56:34 +00:00
resource_test.go make copyrightfix 2026-02-17 13:56:34 +00:00
state.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_deepcopy.go make copyrightfix 2026-02-17 13:56:34 +00:00
state_equal.go states: fix RootOutputValuesEqual comparing s2 to itself (#38181) 2026-02-18 11:15:37 +00:00
state_string.go states: Only track root module output values 2023-12-07 09:56:36 -08:00
state_test.go states: fix RootOutputValuesEqual comparing s2 to itself (#38181) 2026-02-18 11:15:37 +00:00
sync.go make copyrightfix 2026-02-17 13:56:34 +00:00