github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/website/source/docs/commands/index.html.markdown (about)

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