Use module output


is it possible to get output from module like this ?:

module "foo" {

output "id" {
    value = ["${bar.this.*.id}"]

ressource "res" {
    bar = ${element(*.id, count.index)}

I don’t know how to use output from module.
Any help ?
thanks drug

Use, the syntax is module.NAME.ATTRIBUTE. For your example, it would be, where id is an output variable in that module. See Using Modules for more info.