Get output from nested modules child2 in child 1

hi, i have a question imagine we have a root module, and 2 children modules, and we want to sen output from child 1 to child 2.


Root module

module child1
source =“./child1”

module child 2 is: ( will cal a module child 3 {
source =“./child3”
}
###and i will nedd a variable on root module set wit a output from child 3.

PSudocode (does work, but teaocically will some thing like this)

Value=module.child2.child3.ouputvalue

how can a send output values between nested children modules.

Child3 would need an output value that you are want. Then child2 will also need an output, set to the value of the output from child3.

You then can access that as module.child2.output_name