ab62b330c1
If plan and apply are both run against the same context then we still have the planned output values in memory while we're doing the apply walk, so we need to make sure to update them along with the state as we learn the final known values of each output. There were actually two different bugs here: - We weren't removing any existing planned change for an output when setting a new one. In retrospect a map would've been a better data structure for the output changes, rather than a slice to mimic what we do for resource instance objects, but for now we'll leave the structures alone and clean up as needed. (The set of outputs should be small for any reasonable configuration, so the main impact of this is some ugly code in RemoveOutputChange.) - RemoveOutputChange itself had a bug where it was iterating over the resource changes rather than the output changes. This didn't matter before because we weren't actually using that function, but now we are. This fix is confirmed by restoring various existing context apply tests back to passing again. |
||
---|---|---|
.. | ||
internal/planproto | ||
objchange | ||
planfile | ||
action.go | ||
action_string.go | ||
changes.go | ||
changes_src.go | ||
changes_state.go | ||
changes_sync.go | ||
doc.go | ||
dynamic_value.go | ||
dynamic_value_test.go | ||
plan.go | ||
plan_test.go |