Calling output from child module to parent module

Hello everyone
I am facing an issue with Terraform configuration. I have created a child module where I declared out put values to be printed.
On calling these output values in parent module with format module.modulename.outputname defined in child module gives me an error there is no output name attribute but when trying with module.modulename it prints the output

Note: variables are declared as map object in parent module

Want to understand why module.modulename.outputname doesn’t work as this is the only recommended way given in Terraform doc

Hi @aseemgupta1992,

What you’ve described sounds like it should have worked to me, so I assume there must be some detail that isn’t quite right but I cannot tell from what you’ve shared.

Please share the configuration you’re working with and the exact full error message Terraform returned when you tried to plan or apply it.