Commit Graph

3 Commits

Author SHA1 Message Date
Mitchell Hashimoto e4d2193ed6
command/state: mv and rm -backup works
Fixes #12154

The "-backup" flag before for "state *" CLI had some REALLY bizarre behavior:
it would change the _destination_ state and actually not create any
additional backup at all (the original state was unchanged and the
normal timestamped backup still are written). Really weird.

This PR makes the -backup flag work as you'd expect with one caveat:
we'll _still_ create the timestamped backup file. The timestamped backup
file helps make sure that you always get a backup history when using
these commands. We don't want to make it easy for you to overwrite a
state with the `-backup` flag.
2017-02-21 21:10:03 -08:00
Paul Stack 4d46812bab Update state_rm_test.go
Removing sort as it was imported and not used
2016-08-16 18:10:38 +01:00
Mitchell Hashimoto 3fdc08a9eb core: Add `terraform state rm` command and docs
This commit adds the `state rm` command for removing an address from
state. It is the result of a rebase from pull-request #5953 which was
lost at some point during the Terraform 0.7 feature branch merges.
2016-08-16 16:45:44 +01:00