Commit Graph

4 Commits

Author SHA1 Message Date
Mitchell Hashimoto d2d87bccf0 Merge pull request #12155 from hashicorp/b-state-backend
command: refresh state in old commands for backend
2017-02-22 18:40:55 -08:00
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
Mitchell Hashimoto 6e1dc9c77d
command: extra RefreshState calls 2017-02-21 20:35:43 -08: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