Skip to main content

Module projection

Module projection 

Source
Expand description

RawComponent → IR projection.

Phase 3 closes M0 by turning the loader’s flat list of RawBlocks into the typed IR shapes downstream code consumes: Resource, ProviderBlock, ModuleCall, Variable, Local, Output, and the workspace-level Component.

Per 10-data-model.md § 2.2 and 20-parquet-exporter.md § 3, the projection is structural: it copies fields verbatim out of the AttributeMap the loader produced. No evaluation, no template expansion, no reference resolution. Anything that needs the evaluator stays as Expression::Unresolved (Phase 4 will reduce them).

Provider aliases on resources land as ProviderRef; the lookup is a syntactic check that the right-hand side of provider = aws.<alias> is an Expression::Unresolved with a non-Var/Local symbol kind. Anything richer (a conditional, a function call) is treated as “no alias known” and the resource keeps provider_ref = None.

Functions§

project_component
Project a RawComponent into a fully-typed Component.