terraform/backend/local
Martin Atkins 671aace8ec backend/local: disable local backup of remote state
Previously we forced all remote state backends to be wrapped in a
BackupState wrapper that generates a local "terraform.tfstate.backup"
file before updating the remote state.

This backup mechanism was motivated by allowing users to recover a
previous state if user error caused an undesirable change such as loss
of the record of one or more resources. However, it also has the downside
of flushing a possibly-sensitive state to local disk in a location where
users may not realize its purpose and accidentally check it into version
control. Those using remote state would generally prefer that state never
be flushed to local disk at all.

The use-case of recovering older states can be dealt with for remote
backends by selecting a backend that has preservation of older versions
as a first-class feature, such as S3 versioning or Terraform Enterprise's
first-class historical state versioning mechanism.

There remains still one case where state can be flushed to local disk: if
a write to the remote backend fails during "terraform apply" then we will
still create the "errored.tfstate" file to allow the user to recover. This
seems like a reasonable compromise because this is done only in an
_exceptional_ case, and the console output makes it very clear that this
file has been created.

Fixes #15339.
2017-10-27 17:06:33 -07:00
..
test-fixtures core: Move Refreh/Plan diff count to general operation test 2017-06-24 07:54:40 -07:00
backend.go backend/local: disable local backup of remote state 2017-10-27 17:06:33 -07:00
backend_apply.go command: various adjustments to the diff presentation 2017-09-01 17:55:05 -07:00
backend_apply_test.go backend/local: create local state file if backend write fails 2017-05-23 11:18:01 -07:00
backend_local.go Add warning to mismatched plan state 2017-07-17 10:41:29 -04:00
backend_plan.go cli: allow disabling "next steps" message in terraform plan 2017-09-14 10:51:41 -07:00
backend_plan_test.go cli: allow disabling "next steps" message in terraform plan 2017-09-14 10:51:41 -07:00
backend_refresh.go provide contexts to clistate.Lock calls 2017-04-01 17:09:20 -04:00
backend_refresh_test.go backend/local: refresh with no config should not crash on input 2017-02-22 13:10:08 -08:00
backend_test.go backend/local: disable local backup of remote state 2017-10-27 17:06:33 -07:00
cli.go cli: allow disabling "next steps" message in terraform plan 2017-09-14 10:51:41 -07:00
counthookaction_string.go Fix stringer comments (#15069) 2017-06-05 10:17:35 +01:00
hook_count.go core: Skip diff hooks for stubs on eval altogether 2017-06-24 08:01:17 -07:00
hook_count_action.go backend/local 2017-01-26 14:33:49 -08:00
hook_count_test.go core: Skip diff hooks for stubs on eval altogether 2017-06-24 08:01:17 -07:00
hook_state.go Revert "have StateHook periodically PersistState" 2017-06-07 16:25:19 -07:00
hook_state_test.go Revert "have StateHook periodically PersistState" 2017-06-07 16:25:19 -07:00
local_test.go backend/local 2017-01-26 14:33:49 -08:00
testing.go command + backend: rename various API objects to "Workspace" terminology 2017-06-09 16:26:25 -07:00