Should a module output whole resources or individual attributes?

IntermediateConceptModules
Answer

Individual attributes are a stable contract: consumers depend only on what you chose to expose. Outputting an entire resource object leaks all its attributes (including sensitive ones) and makes internal refactors breaking changes. Use whole objects only for deliberate "bundle" outputs such as { id, arn, name }.

All Terraform questions Roadmap: Terraform

More on Modules