Commit Graph

5 Commits

Author SHA1 Message Date
Chris Marchesi 04d00cec9f
help: Make version and help flags consistent
These flags are presented as POSIX/GNU-style long-form flags
(double-dash), whereas the rest of our CLI flags as seen in sub-commands
are presented as single-dash options.

While both work in both cases (on part of the flag package allowing
double dashes as well), we converge around the single-dash form, so the
basic help text here should be consistent.
2018-08-01 14:28:39 -07:00
Martin Atkins fef5727904 Remind future maintainers to update the docs when changing CLI usage
We have a copy of the output from running just "terraform" in a page on
the website. It doesn't necessarily need to be kept 100% up to date, since
users can always run the command to get the result from the horses mouth,
but it's nice to keep it somewhat up-to-date to reduce use confusion.
2016-11-24 09:22:18 -08:00
Robert Deusser 72f117b6c5 Cleanup main help message to look cleaner 2016-10-10 14:47:35 -04:00
Chris Bednarski 6360e6c8b6 Implemented internal plugin calls; which allows us to compile plugins into the main terraform binary 2016-05-10 14:40:11 -04:00
Mitchell Hashimoto d1b46e99bd Add `terraform state list` command
This introduces the terraform state list command to list the resources
within a state. This is the first of many state management commands to
come into 0.7.

This is the first command of many to come that is considered a
"plumbing" command within Terraform (see "plumbing vs porcelain":
http://git.661346.n2.nabble.com/what-are-plumbing-and-porcelain-td2190639.html).
As such, this PR also introduces a bunch of groundwork to support
plumbing commands.

The main changes:

- Main command output is changed to split "common" and "uncommon"
  commands.

- mitchellh/cli is updated to support nested subcommands, since
  terraform state list is a nested subcommand.

- terraform.StateFilter is introduced as a way in core to filter/search
  the state files. This is very basic currently but I expect to make it
  more advanced as time goes on.

- terraform state list command is introduced to list resources in a
  state. This can take a series of arguments to filter this down.

Known issues, or things that aren't done in this PR on purpose:

- Unit tests for terraform state list are on the way. Unit tests for the
  core changes are all there.
2016-05-10 14:14:47 -04:00