mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
9b449bec99
Resource dependencies are by nature an unordered collection, but they're persisted to state as a JSON array (in random order). This makes a mess for `terraform apply -refresh-only`, which sees the new random order as a change that requires the user to approve a state update. (As an additional problem on top of that, the user interface for refresh-only runs doesn't expect to see that as a type of change, so it says "no changes! would you like to update to reflect these detected changes?") This commit changes `ResourceInstanceObject.Encode()` to sort the in-memory slice of dependencies (lexically, by address) before passing it on to be compared and persisted. This appears to fix the observed UI issues with a minimum of logic changes. |
||
---|---|---|
.. | ||
remote | ||
statefile | ||
statemgr | ||
doc.go | ||
instance_generation.go | ||
instance_object_src.go | ||
instance_object.go | ||
module.go | ||
objectstatus_string.go | ||
output_value.go | ||
resource_test.go | ||
resource.go | ||
state_deepcopy.go | ||
state_equal.go | ||
state_string.go | ||
state_test.go | ||
state.go | ||
sync.go |