Skip to content

Instantly share code, notes, and snippets.

@thegedge
Created October 5, 2015 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thegedge/24a9e06a2fbb1ceb2431 to your computer and use it in GitHub Desktop.
Save thegedge/24a9e06a2fbb1ceb2431 to your computer and use it in GitHub Desktop.
Forwarding module outputs for remote state or `terraform output`
// Foo has outputs "bar" and "baz"
module "foo" {
source = "..."
arg1 = "spam"
arg2 = "eggs"
}
// If you want `terraform output` or your remote state to show the outputs of
// `module.foo` you need to "forward" them along here:
output "bar" { value = "${module.foo.bar}" }
output "baz" { value = "${module.foo.baz}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment