github.com/chalford/terraform@v0.3.7-0.20150113080010-a78c69a8c81f/website/source/docs/commands/index.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Commands" 4 sidebar_current: "docs-commands" 5 description: |- 6 Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. This application then takes a subcommand such as "apply" or "plan". The complete list of subcommands is in the navigation to the left. 7 --- 8 9 # Terraform Commands (CLI) 10 11 Terraform is controlled via a very easy to use command-line interface (CLI). 12 Terraform is only a single command-line application: terraform. This application 13 then takes a subcommand such as "apply" or "plan". The complete list of subcommands 14 is in the navigation to the left. 15 16 The terraform CLI is a well-behaved command line application. In erroneous cases, 17 a non-zero exit status will be returned. It also responds to -h and --help as you'd 18 most likely expect. 19 20 To view a list of the available commands at any time, just run terraform with no arguments: 21 22 ``` 23 $ terraform 24 usage: terraform [--version] [--help] <command> [<args>] 25 26 Available commands are: 27 apply Builds or changes infrastructure 28 destroy Destroy Terraform-managed infrastructure 29 get Download and install modules for the configuration 30 graph Create a visual graph of Terraform resources 31 init Initializes Terraform configuration from a module 32 output Read an output from a state file 33 plan Generate and show an execution plan 34 pull Refreshes the local state copy from the remote server 35 push Uploads the the local state to the remote server 36 refresh Update local state file against real resources 37 remote Configures remote state management 38 show Inspect Terraform state or plan 39 version Prints the Terraform version 40 ``` 41 42 To get help for any specific command, pass the -h flag to the relevant subcommand. For example, 43 to see help about the members subcommand: 44 45 ``` 46 $ terraform graph -h 47 Usage: terraform graph [options] PATH 48 49 Outputs the visual graph of Terraform resources. If the path given is 50 the path to a configuration, the dependency graph of the resources are 51 shown. If the path is a plan file, then the dependency graph of the 52 plan itself is shown. 53 54 The graph is outputted in DOT format. The typical program that can 55 read this format is GraphViz, but many web services are also available 56 to read this format. 57 ``` 58