terraform/helper
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
..
acctest Add 'RandIpAddress'. 2019-08-02 14:51:40 -04:00
config prune NewResourceConfig and update tests 2019-08-05 22:08:03 -04:00
copy
customdiff
didyoumean
encryption
experiment command: Add experimental concise diff renderer 2020-09-10 10:35:55 -04:00
hashcode Update hashcode.go 2020-05-22 11:28:56 +05:30
hilmapstructure
logging helper/logging: Loosen the filtering heuristic even more 2019-12-05 15:22:03 -08:00
mutexkv
pathorcontents helper/pathorcontents: Skip one test when root 2018-09-19 11:38:51 -05:00
plugin Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
resource remove depends_on from helper test shims 2020-05-14 15:57:16 -04:00
schema core: Remove the last few HIL remnants 2020-09-02 15:53:33 -07:00
shadow
signalwrapper
slowmessage
structure
validation Merge pull request #18614 from craigatgoogle/float-validation 2019-05-06 17:56:56 -07:00
variables
wrappedreadline
wrappedstreams don't call os.NewFile on unknown FDs 2020-04-04 15:46:19 -04:00
README.md

README.md

Helper Libraries

This folder contains helper libraries for Terraform plugins. A running joke is that this is "Terraform standard library" for plugins. The goal of the packages in this directory are to provide high-level helpers to make it easier to implement the various aspects of writing a plugin for Terraform.