9a62ab3014
During the Terraform 0.12 work we briefly had a partial update of the old Terraform 0.11 (and prior) diff renderer that could work with the new plan structure, but could produce only partial results. We switched to the new plan implementation prior to release, but the "terraform show" command was left calling into the old partial implementation, and thus produced incomplete results when rendering a saved plan. Here we instead use the plan rendering logic from the "terraform plan" command, making the output of both identical. Unfortunately, due to the current backend architecture that logic lives inside the local backend package, and it contains some business logic around state and schema wrangling that would make it inappropriate to move wholesale into the command/format package. To allow for a low-risk fix to the "terraform show" output, here we avoid some more severe refactoring by just exporting the rendering functionality in a way that allows the "terraform show" command to call into it. In future we'd like to move all of the code that actually writes to the output into the "command" package so that the roles of these components are better segregated, but that is too big a change to block fixing this issue. |
||
---|---|---|
.. | ||
testdata | ||
backend.go | ||
backend_apply.go | ||
backend_apply_test.go | ||
backend_local.go | ||
backend_plan.go | ||
backend_plan_test.go | ||
backend_refresh.go | ||
backend_refresh_test.go | ||
backend_test.go | ||
cli.go | ||
counthookaction_string.go | ||
hook_count.go | ||
hook_count_action.go | ||
hook_count_test.go | ||
hook_state.go | ||
hook_state_test.go | ||
local_test.go | ||
testing.go |