Update remote_state.html.md

This commit is contained in:
Mitchell Hashimoto 2016-10-24 14:14:49 -07:00 committed by GitHub
parent ab14f52748
commit 4acd4a2bcf
1 changed files with 18 additions and 0 deletions

View File

@ -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.