terraform/backend
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
..
atlas backend/atlas: accept ATLAS_ADDRESS env var for address 2017-03-16 23:04:07 -07:00
init backend/remote-state/gcs: Rename "gcloud" to "gcs" for backwards compatibility. 2017-10-27 16:51:21 -04:00
legacy Make backcend/legacy match new Backend iface 2017-02-28 16:35:45 -05:00
local backend/local: disable local backup of remote state 2017-10-27 17:06:33 -07:00
remote-state Merge pull request #16484 from hashicorp/f-gcloud-backend 2017-10-27 17:23:22 -04:00
backend.go command: also print plan for destroy 2017-06-27 11:22:31 -07:00
cli.go cli: allow disabling "next steps" message in terraform plan 2017-09-14 10:51:41 -07:00
nil.go Update Backend interface to latest iteration 2017-02-28 16:07:07 -05:00
nil_test.go backend: introduce the backend set of interfaces 2017-01-26 14:33:49 -08:00
operation_type.go backend: introduce the backend set of interfaces 2017-01-26 14:33:49 -08:00
operationtype_string.go Fix stringer comments (#15069) 2017-06-05 10:17:35 +01:00
testing.go Obtaining the current metadata before setting it 2017-09-06 12:41:05 -07:00