terraform/backend/local
Alisdair McDiarmid 09d8355f43 command: Add experimental concise diff renderer
When rendering a diff between current state and projected state, we only
show resources and outputs which have changes. However, we show a full
structural diff for these values, which includes all attributes and
blocks for a changed resource or output. The result can be a very long
diff, which makes it difficult to verify what the changed fields are.

This commit adds an experimental concise diff renderer, which suppresses
most unchanged fields, only displaying the most relevant changes and
some identifying context. This means:

- Always show all identifying attributes, initially defined as `id`,
  `name`, and `tags`, even if unchanged;
- Only show changed, added, or removed primitive values: `string`,
  `number`, or `bool`;
- Only show added or removed elements in unordered collections and
  structural types: `map`, `set`, and `object`;
- Show added or removed elements with any surrounding unchanged elements
  for sequence types: `list` and `tuple`;
- Only show added or removed nested blocks, or blocks with changed
  attributes.

If any attributes, collection elements, or blocks are hidden, a count
is kept and displayed at the end of the parent scope. This ensures that
it is clear that the diff is only displaying a subset of the resource.

The experiment is currently enabled by default, but can be disabled by
setting the TF_X_CONCISE_DIFF environment variable to 0.
2020-09-10 10:35:55 -04:00
..
testdata backend/local: treat output changes as side-effects to be applied 2020-05-29 07:36:40 -07:00
backend.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_apply.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_apply_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_local.go Minor typo 2020-09-03 11:25:55 +03:00
backend_local_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_plan.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_plan_test.go command: Add experimental concise diff renderer 2020-09-10 10:35:55 -04:00
backend_refresh.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00
backend_refresh_test.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04: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 state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
hook_state_test.go state: remove deprecated state package (#25490) 2020-08-11 11:43:01 -04:00
local_test.go backend/local 2017-01-26 14:33:49 -08:00
testing.go * backend/local: push responsibility for unlocking state into individual operations 2020-08-11 11:23:42 -04:00