terraform/website/docs
Martin Atkins 31a4b44d2e backend/local: treat output changes as side-effects to be applied
This is a baby-step towards an intended future where all Terraform actions
which have side-effects in either remote objects or the Terraform state
can go through the plan+apply workflow.

This initial change is focused only on allowing plan+apply for changes to
root module output values, so that these can be written into a new state
snapshot (for consumption by terraform_remote_state elsewhere) without
having to go outside of the primary workflow by running
"terraform refresh".

This is also better than "terraform refresh" because it gives an
opportunity to review the proposed changes before applying them, as we're
accustomed to with resource changes.

The downside here is that Terraform Core was not designed to produce
accurate changesets for root module outputs. Although we added a place for
it in the plan model in Terraform 0.12, Terraform Core currently produces
inaccurate changesets there which don't properly track the prior values.

We're planning to rework Terraform Core's evaluation approach in a
forthcoming release so it would itself be able to distinguish between the
prior state and the planned new state to produce an accurate changeset,
but this commit introduces a temporary stop-gap solution of implementing
the logic up in the local backend code, where we can freeze a snapshot of
the prior state before we take any other actions and then use that to
produce an accurate output changeset to decide whether the plan has
externally-visible side-effects and render any changes to output values.

This temporary approach should be replaced by a more appropriately-placed
solution in Terraform Core in a release, which should then allow further
behaviors in similar vein, such as user-visible drift detection for
resource instances.
2020-05-29 07:36:40 -07:00
..
backends Merge pull request #24319 from ritarock/improve_doc 2020-05-21 14:33:14 -07:00
commands backend/local: treat output changes as side-effects to be applied 2020-05-29 07:36:40 -07:00
configuration configs: Custom variable validation is no longer experimental 2020-05-28 16:07:59 -07:00
configuration-0-11 website: Remove links to the getting started guide's old location 2020-03-18 14:20:03 -07:00
import Removing the "future version will... 2020-05-20 20:44:43 -04:00
internals update addressing section 2020-04-13 12:13:18 -04:00
modules Add reference to new modules track (#24445) 2020-04-28 11:09:42 -07:00
plugins Modify language for reporting signing state 2020-05-26 13:14:05 -04:00
providers Merge pull request #22826 from yessarath/patch-1 2020-05-21 14:54:55 -07:00
provisioners Remove (now) incorrect example 2020-05-05 16:31:57 -04:00
registry Modify language for reporting signing state 2020-05-26 13:14:05 -04:00
state backend/cos: Add TencentCloud backend cos with lock (#22540) 2020-02-13 11:37:11 -05:00
cli-index.html.md website: Use canonical URLs for learn.hashicorp.com links 2019-12-20 16:06:00 -08:00