terraform/command/jsonplan
Alisdair McDiarmid a5b7394f9a command/jsonplan: Add replace_paths
The set of paths which caused a resource update to require replacement
has been stored in the plan since 0.15.0 (#28201). This commit adds a
simple JSON representation of these paths, allowing consumers of this
format to determine exactly which paths caused the resource to be
replaced.

This representation is intentionally more loosely encoded than the JSON
state serialization of paths used for sensitive attributes. Instead of a
path step being represented by an object with type and value, we use a
more-JavaScripty heterogenous array of numbers and strings. Any
practical consumer of this format will likely traverse an object tree
using the index operator, which should work more easily with this
format. It also allows easy prefix comparison for consumers which are
tracking paths.

While updating the documentation to include this new field, I noticed
that some others were missing, so added them too.
2021-05-04 16:51:51 -04:00
..
doc.go json output of terraform plan (#19687) 2018-12-19 11:08:25 -08:00
module.go command/jsonplan: sort resources by address (#20113) 2019-01-25 09:17:40 -08:00
plan.go command/jsonplan: Add replace_paths 2021-05-04 16:51:51 -04:00
plan_test.go command/jsonplan: Add replace_paths 2021-05-04 16:51:51 -04:00
resource.go plans: Track an optional extra "reason" for some planned actions 2021-04-29 17:50:46 -07:00
values.go Mildwonkey/command tests (#24535) 2020-04-06 09:24:23 -07:00
values_test.go Mildwonkey/command tests (#24535) 2020-04-06 09:24:23 -07:00