terraform/command/format
Martin Atkins b802237e03 plans: Track an optional extra "reason" for some planned actions
Previously we were repeating some logic in the UI layer in order to
recover relevant additional context about a change to report to a user.
In order to help keep things consistent, and to have a clearer path for
adding more such things in the future, here we capture this user-facing
idea of an "action reason" within the plan model, and then use that
directly in order to decide how to describe the change to the user.

For the moment the "tainted" situation is the only one that gets a special
message, matching what we had before, but we can expand on this in future
in order to give better feedback about the other replace situations too.

This also preemptively includes the "replacing by request" reason, which
is currently not reachable but will be used in the near future as part of
implementing the -replace=... plan command line option to allow forcing
a particular object to be replaced.

So far we don't have any special reasons for anything other than replacing,
which makes sense because replacing is the only one that is in a sense
a special case of another action (Update), but this could expand to
other kinds of reasons in the future, such as explaining which of the
few different reasons a data source read might be deferred until the
apply step.
2021-04-29 17:50:46 -07:00
..
diagnostic.go "with" formatting 2021-04-06 15:50:30 -04:00
diagnostic_test.go command: no visual warning hierarchy in -no-color 2021-01-27 09:26:53 -08:00
diff.go plans: Track an optional extra "reason" for some planned actions 2021-04-29 17:50:46 -07:00
diff_test.go plans: Track an optional extra "reason" for some planned actions 2021-04-29 17:50:46 -07:00
format.go
object_id.go
object_id_test.go
state.go Merge pull request #27081 from hashicorp/jbardin/staticcheck 2020-12-02 15:43:10 -05:00
state_test.go Mildwonkey/providers interface renaming (#27805) 2021-02-18 10:13:43 -05:00
trivia.go command/format: Don't try to fill the last terminal column 2021-01-13 15:37:04 -08:00