terraform/backend/local
Martin Atkins 9a62ab3014 command: "terraform show" renders plans like "terraform plan"
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.
2019-11-06 06:53:32 -08:00
..
testdata Standardise directory name for test data 2019-06-30 10:16:15 +02:00
backend.go fix misspelling 2019-03-05 16:12:52 +03:00
backend_apply.go core: Warn when creating and applying with -target 2019-09-17 14:36:05 -07:00
backend_apply_test.go Standardise directory name for test data 2019-06-30 10:16:15 +02:00
backend_local.go backend: Allow certain commands to opt out of required variable checks 2019-10-10 10:07:01 -07:00
backend_plan.go command: "terraform show" renders plans like "terraform plan" 2019-11-06 06:53:32 -08:00
backend_plan_test.go Standardise directory name for test data 2019-06-30 10:16:15 +02:00
backend_refresh.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
backend_refresh_test.go Standardise directory name for test data 2019-06-30 10:16:15 +02:00
backend_test.go Implement the remote enhanced backend 2018-11-06 16:29:46 +01:00
cli.go command: Fix TestMetaBackend_configuredChangeCopy_multiToMulti 2018-11-19 09:02:35 -08:00
counthookaction_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
hook_count.go backend/local: Fix incorrect destroy/update count on apply 2018-12-11 18:06:53 +00:00
hook_count_action.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
hook_count_test.go backend/local: Fix incorrect destroy/update count on apply 2018-12-11 18:06:53 +00:00
hook_state.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
hook_state_test.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
local_test.go backend/local 2017-01-26 14:33:49 -08:00
testing.go backend/local: Fix mock provider in tests 2019-02-08 12:48:32 -08:00