diff --git a/website/source/docs/commands/graph.html.markdown b/website/source/docs/commands/graph.html.markdown new file mode 100644 index 000000000..e38b74297 --- /dev/null +++ b/website/source/docs/commands/graph.html.markdown @@ -0,0 +1,39 @@ +--- +layout: "docs" +page_title: "Command: graph" +sidebar_current: "docs-commands-graph" +--- + +# Command: graph + +The `terraform graph` command is used to generate a visual +representation of either a configuration or execution plan. +The output is in the DOT format, which can be used by +GraphViz to generate charts. + + +## Usage + +Usage: `terraform output [options] [input]` + +By default, `output` scans the current directory for the configuration +and generates the output for that configuration. However, a path to +another configuration or an execution plan can be provided. Execution plans +provide more details on creation, deletion or changes. + +## Generating Images + +The output of `terraform graph` is in the DOT format, which can +easily be converted to an image by making use of `dot` provided +by GraphViz: + +``` +$ terraform graph | dot -Tpng > graph.png +``` + +Alternatively, the webbased [GraphViz Workspace](http://graphviz-dev.appspot.com) +can be used to quickly render DOT file inputs as well. + +Here is an example graph output: +![Graph Example](/images/graph-example.png) + diff --git a/website/source/docs/commands/output.html.markdown b/website/source/docs/commands/output.html.markdown new file mode 100644 index 000000000..8ac98aa69 --- /dev/null +++ b/website/source/docs/commands/output.html.markdown @@ -0,0 +1,22 @@ +--- +layout: "docs" +page_title: "Command: output" +sidebar_current: "docs-commands-output" +--- + +# Command: output + +The `terraform output` command is used to extract the value of +an output variable from the state file. + +## Usage + +Usage: `terraform output [options] NAME` + +By default, `plan` requires only a variable name and looks in the +current directory for the state file to query. + +The command-line flags are all optional. The list of available flags are: + +* `-state=path` - Path to the state file. Defaults to "terraform.tfstate". + diff --git a/website/source/images/graph-example.png b/website/source/images/graph-example.png new file mode 100644 index 000000000..8c007a6bf Binary files /dev/null and b/website/source/images/graph-example.png differ