Interview Prep/Terraform/Variables, Locals, Outputs and Types

How do outputs work between modules and what can you set on them?

IntermediateConceptVariables, Locals, Outputs and Types
Answer

A child module's outputs are read as module.<name>.<output>. An output can be sensitive, can have depends_on (rarely needed) and, since 1.2, precondition blocks to validate before exposing. Only outputs are visible outside a module; internal resources are not addressable from the caller.

All Terraform questions Roadmap: Terraform

More on Variables, Locals, Outputs and Types