From 4acd4a2bcf52a2ac81bfb6e6ef0613523b2fb1f0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 24 Oct 2016 14:14:49 -0700 Subject: [PATCH] Update remote_state.html.md --- d/remote_state.html.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/d/remote_state.html.md b/d/remote_state.html.md index 68386e8b8..d5ec49fa0 100644 --- a/d/remote_state.html.md +++ b/d/remote_state.html.md @@ -43,3 +43,21 @@ The following attributes are exported: In addition, each output in the remote state appears as a top level attribute on the `terraform_remote_state` resource. + +## Root Outputs Only + +Only the root level outputs from the remote state are accessible. Outputs from modules within the state cannot be accessed. If you want a module output to be accessible via a remote state, you must thread the output through to a root output. + +An example is shown below: + +``` +module "app" { + source = "..." +} + +output "app_value" { + value = "${module.app.value}" +} +``` + +In this example, the output `value` from the "app" module is available as "app_value". If this root level output hadn't been created, then a remote state resource wouldn't be able to access the `value` output on the module.