From 3d41f3d836733515e230f129b19802400ab5db4a Mon Sep 17 00:00:00 2001 From: Rubens Mariuzzo Date: Thu, 24 Nov 2016 11:54:38 -0400 Subject: [PATCH 1/2] Updated terraform output --- .../getting-started/install.html.markdown | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/website/source/intro/getting-started/install.html.markdown b/website/source/intro/getting-started/install.html.markdown index ca16172f7f..a79b925f47 100644 --- a/website/source/intro/getting-started/install.html.markdown +++ b/website/source/intro/getting-started/install.html.markdown @@ -42,23 +42,35 @@ terminal session and checking that `terraform` is available. By executing ``` $ terraform -usage: terraform [--version] [--help] [] - -Available commands are: - apply Builds or changes infrastructure - destroy Destroy Terraform-managed infrastructure - get Download and install modules for the configuration - graph Create a visual graph of Terraform resources - init Initializes Terraform configuration from a module - output Read an output from a state file - plan Generate and show an execution plan - push Upload this Terraform module to Atlas to run - refresh Update local state file against real resources - remote Configure remote state storage - show Inspect Terraform state or plan - taint Manually mark a resource for recreation - validate Validates the Terraform files - version Prints the Terraform version +Usage: terraform [--version] [--help] [args] + +The available commands for execution are listed below. +The most common, useful commands are shown first, followed by +less common or more advanced commands. If you're just getting +started with Terraform, stick with the common commands. For the +other commands, please read the help and docs before usage. + +Common commands: + apply Builds or changes infrastructure + destroy Destroy Terraform-managed infrastructure + fmt Rewrites config files to canonical format + get Download and install modules for the configuration + graph Create a visual graph of Terraform resources + import Import existing infrastructure into Terraform + init Initializes Terraform configuration from a module + output Read an output from a state file + plan Generate and show an execution plan + push Upload this Terraform module to Atlas to run + refresh Update local state file against real resources + remote Configure remote state storage + show Inspect Terraform state or plan + taint Manually mark a resource for recreation + untaint Manually unmark a resource as tainted + validate Validates the Terraform files + version Prints the Terraform version + +All other commands: + state Advanced state management ``` If you get an error that `terraform` could not be found, then your PATH From fef57279043d0e474448c9fb5d5ee6196a96ad32 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 24 Nov 2016 09:22:18 -0800 Subject: [PATCH 2/2] 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. --- commands.go | 6 ++++++ help.go | 3 +++ 2 files changed, 9 insertions(+) diff --git a/commands.go b/commands.go index fd8b0c57a2..dbffe9b7a9 100644 --- a/commands.go +++ b/commands.go @@ -35,6 +35,12 @@ func init() { Ui: Ui, } + // The command list is included in the terraform -help + // output, which is in turn included in the docs at + // website/source/docs/commands/index.html.markdown; if you + // add, remove or reclassify commands then consider updating + // that to match. + PlumbingCommands = map[string]struct{}{ "state": struct{}{}, // includes all subcommands "debug": struct{}{}, // includes all subcommands diff --git a/help.go b/help.go index 0358942ec9..cd4e6714b5 100644 --- a/help.go +++ b/help.go @@ -28,6 +28,9 @@ func helpFunc(commands map[string]cli.CommandFactory) string { } } + // The output produced by this is included in the docs at + // website/source/docs/commands/index.html.markdown; if you + // change this then consider updating that to match. helpText := fmt.Sprintf(` Usage: terraform [--version] [--help] [args]