Modules with varying (content-hugging) height?

Hi - is there a way for modules to automatically adjust their height according to the content, similar to how a container would? I'm putting a container into a module, and that does adjust, but it seems to either undershoot over overflow its module container.

Thank you!