Commit Graph

10 Commits

Author SHA1 Message Date
James Bardin 39a5ddd381 Split Meta back out of StateMeta
Removing the call to StateMeta.Env, so that it doesn't need an embedded
Meta field. Embed Meta and StateMeta separately in all State commands.
2017-03-01 10:20:32 -05:00
James Bardin 4dac986a91 Local.StatePaths doesn't need to reutrn an error
add a test to ensure we have consistent output
2017-02-28 19:18:16 -05:00
James Bardin b53704ed87 Thread the environment through all commands
Add Env and SetEnv methods to command.Meta to retrieve the current
environment name inside any command.

Make sure all calls to Backend.State contain an environment name, and
make the package compile against the update backend package.
2017-02-28 16:35:46 -05:00
James Bardin 1ea9413c07 Remove state path handling from commands
The Local backend is now responsible for handling the paths to the local
state files, since they are dependent on the current environment.
2017-02-28 16:06:14 -05: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 ad7b063262
command: convert to use backends 2017-01-26 14:33:49 -08:00
James Bardin bf20db688c Remove extra dot from state backup file
The state subcommand was adding an extra dot to the backup file
2016-11-22 15:39:00 -05:00
Mitchell Hashimoto d94f503501
command/state meta: State func 2016-05-11 09:16:48 -07:00
Mitchell Hashimoto f34ef1f92a
command: compilation works
This still isn't ready. But this gets tests passing and compilation
working
2016-05-10 17:03:58 -07:00
Mitchell Hashimoto f6692e66ac add command/state show 2016-05-10 14:14:47 -04:00