1. HashiCorp Terraform Documentation, "Local Values": This document establishes the scope of local values. It states, "A local value can only be accessed in expressions within the module where it was defined." This confirms their private nature, necessitating a mechanism like outputs for external access.
Source: HashiCorp, "Local Values - Configuration Language," Terraform Documentation. Available at: https://developer.hashicorp.com/terraform/language/values/locals
2. HashiCorp Terraform Documentation, "Output Values": This document defines the purpose of outputs. It explains, "Output values are like the return values of a module... The value argument takes an expression whose result is to be returned to the user." This confirms that an output's value can be derived from an expression, which can include a local value.
Source: HashiCorp, "Output Values - Configuration Language," Terraform Documentation. Available at: https://developer.hashicorp.com/terraform/language/values/outputs
3. HashiCorp Terraform Documentation, "Module Blocks": This document describes how modules interact, specifically how a parent module accesses the outputs of a child module. The section on "Accessing Module Output Values" shows the syntax module.., which is how the calling module would consume the local value that has been exposed via an output.
Source: HashiCorp, "Module Blocks - Configuration Language," Terraform Documentation. Available at: https://developer.hashicorp.com/terraform/language/modules/syntax#accessing-module-output-values