terraform/backend
Martin Atkins 7c6e78bcb0 plans: Track both the previous run and prior states in the plan
Until now we've not really cared much about the state snapshot produced
by the previous Terraform operation, except to use it as a jumping-off
point for our refresh step.

However, we'd like to be able to report to an end-user whenever Terraform
detects a change that occurred outside of Terraform, because that's often
helpful context for understanding why a plan contains changes that don't
seem to have corresponding changes in the configuration.

As part of reporting that we'll need to keep track of the state as it
was before we did any refreshing work, so we can then compare that against
the state after refreshing. To retain enough data to achieve that, the
existing Plan field State is now two fields: PrevRunState and PriorState.

This also includes a very shallow change in the core package to make it
populate something somewhat-reasonable into this field so that integration
tests can function reasonably. However, this shallow implementation isn't
really sufficient for real-world use of PrevRunState because we'll
actually need to update PrevRunState as part of planning in order to
incorporate the results of any provider-specific state upgrades to make
the PrevRunState objects compatible with the current provider schema, or
else our diffs won't be valid. This deeper awareness of PrevRunState in
Terraform Core will follow in a subsequent commit, prior to anything else
making use of Plan.PrevRunState.
2021-05-05 15:11:05 -07:00
..
init backend: remove deprecated atlas backend 2020-10-26 14:05:18 -04:00
local plans: Track both the previous run and prior states in the plan 2021-05-05 15:11:05 -07:00
remote Update Terraform Cloud/Enterprise client to v0.14.0 2021-05-03 22:25:56 -05:00
remote-state Add config_paths and drop KUBECONFIG env variable in kubernetes backend (#26997) 2021-04-20 10:05:45 -04:00
backend.go core: Minimal initial implementation of -replace=... option 2021-04-30 10:30:56 -07:00
backend_test.go helper: deprecate pathorcontents 2020-10-08 08:42:16 -04:00
cli.go backend: Replace ShowDiagnostics with view.Diagnostics 2021-02-25 11:26:05 -05:00
operation_type.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
operationtype_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
testing.go call the InConfigBody with addresses 2021-04-06 15:15:52 -04:00
unparsed_value.go Remove deprecation on undeclared variable, docs, and summary adjustment (#27795) 2021-02-18 11:11:52 -05:00
unparsed_value_test.go Remove deprecation on undeclared variable, docs, and summary adjustment (#27795) 2021-02-18 11:11:52 -05:00