From acecefb2536a641ca5dd0108aeae68fcf4c5a9d8 Mon Sep 17 00:00:00 2001 From: Kenneth Ford Date: Mon, 19 Dec 2016 13:26:36 -0500 Subject: [PATCH] Add CLI output example to Usage of Modules --- website/source/docs/modules/usage.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/source/docs/modules/usage.html.markdown b/website/source/docs/modules/usage.html.markdown index e28e80aa8..876ab03cf 100644 --- a/website/source/docs/modules/usage.html.markdown +++ b/website/source/docs/modules/usage.html.markdown @@ -97,6 +97,12 @@ This purposely is very similar to accessing resource attributes. Instead of mapp Just like resources, this will create a dependency from the `aws_instance.client` resource to the module, so the module will be built first. +To use module outputs via command line you have to specify the module name before the variable, for example: + +``` +terraform output -module=consul server_availability_zone +``` + ## Plans and Graphs Commands such as the [plan command](/docs/commands/plan.html) and [graph command](/docs/commands/graph.html) will expand modules by default. You can use the `-module-depth` parameter to limit the graph.