terraform/command/testdata/show-json/requires-replace
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
..
main.tf plans: Track an optional extra "reason" for some planned actions 2021-04-29 17:50:46 -07:00
output.json command/jsonplan: Add replace_paths 2021-05-04 16:51:51 -04:00
terraform.tfstate plans: Track an optional extra "reason" for some planned actions 2021-04-29 17:50:46 -07:00