Commit Graph

25 Commits

Author SHA1 Message Date
James Bardin 0fdcf2c01e properly cleanup and print correct error messages
Some Meta tests were not cleaning up their temp directories.

The process test wasn't printing the correct arguments in the error
messages.
2017-07-06 11:33:32 -04:00
Robert Liebowitz 4bf2269784 Add test case for autoloading tfvars 2017-07-05 17:24:17 -07:00
Robert Liebowitz 8d98fdecac Autoload only .auto.tfvars files 2017-07-05 17:24:17 -07:00
Robert Liebowitz 006744bfe0 Use all tfvars files in working directory
As a side effect, several commands that previously did not have a failure
state can now fail during meta-parameter processing.
2017-07-05 17:24:17 -07:00
Martin Atkins 418a8a8bc9 command + backend: rename various API objects to "Workspace" terminology
We're shifting terminology from "environment" to "workspace". This takes
care of some of the main internal API surface that was using the old
terminology, though is not intended to be entirely comprehensive and is
mainly just to minimize the amount of confusion for maintainers as we
continue moving towards eliminating the old terminology.
2017-06-09 16:26:25 -07: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
Mitchell Hashimoto 1248b147ac
command/meta: always ask for unset variable input
Fixes #7975

This changes the InputMode for the CLI to always be:

    InputModeProvider | InputModeVar | InputModeVarUnset

Which means:

  * Ask for provider variables
  * Ask for user variables _that are not already set_

The change is the latter point. Before, we'd only ask for variables if
zero were given. This forces the user to either have no variables set
via the CLI, env vars, tfvars or ALL variables, but no in between. As
reported in #7975, this isn't expected behavior.

The new change makes is so that unset variables are always asked for.
Users can retain the previous behavior by setting `-input=false`. This
would ensure that variables set by external sources cover all cases.
2016-11-01 19:16:43 -07:00
Paul Hinze e67fc0fe9b command: Change module-depth default to -1
This means that terraform commands like `plan`, `apply`, `show`, and
`graph` will expand all modules by default.

While modules-as-black-boxes is still very true in the conceptual design
of modules, feedback on this behavior has consistently suggested that
users would prefer to see more verbose output by default.

The `-module-depth` flag and env var are retained to allow output to be
optionally limited / summarized by these commands.
2016-01-20 13:58:02 -06:00
Anthony Scalisi 198e1a5186 remove various typos 2015-09-11 11:56:20 -07:00
Mitchell Hashimoto 96b53cc06c command: ask for input even if tfvars is set [GH-2161] 2015-06-25 15:29:46 -07:00
Paul Hinze 29d34cd5a4 command: allow module depth to be set via env var
Another convienence env var here with TF_MODULE_DEPTH.

Works like you'd expect it to!
2015-04-30 16:19:43 -05:00
Paul Hinze 5f1ea7fccc command: add env var equivalent to -input arg
Setting TF_INPUT has the equivalent effect of setting the flag.
I got sick of specifying this when iterating on TF config locally.
2015-04-30 09:59:14 -05:00
Mitchell Hashimoto 9062bfda89 command/meta: fix test 2015-03-24 13:30:23 -07:00
Mitchell Hashimoto 579f102f37 command: start migrating to new state package 2015-02-23 15:13:54 -08:00
Armon Dadgar ba01e27026 command: Refresh remote state when loading 2014-12-10 13:27:09 -08:00
Armon Dadgar 53704db4ee command: Enable reading remote-enabled state 2014-12-10 13:27:09 -08:00
Armon Dadgar bf10111745 command/apply: Move state persistence to Meta 2014-12-10 13:27:09 -08:00
Mitchell Hashimoto 16b023bd2b command: ask for the proper level of input 2014-10-08 10:29:54 -07:00
Mitchell Hashimoto 817f0d9f30 command: don't ask for input if terraform.tfvars file given [GH-346] 2014-10-01 08:37:57 -07:00
Mitchell Hashimoto af548c9b53 command/plan: ask for input 2014-09-29 11:24:16 -07:00
Mitchell Hashimoto 5b0859b3f5 command: Input tells us whether we should ask for input or not 2014-09-29 11:11:35 -07:00
Mitchell Hashimoto 69294b1ba3 command: adhere to -no-color, fix test [GH-250] 2014-09-08 20:41:10 -07:00
Mitchell Hashimoto 642fed0356 command: terraform.tfvars loaded by default if it exists 2014-08-05 09:32:01 -07:00
Mitchell Hashimoto 541d23eea0 command: can set Color to false explicitly 2014-07-17 09:34:32 -07:00
Mitchell Hashimoto 6c736bd3c4 command: introduce Meta and "-no-color" option 2014-07-12 20:21:46 -07:00