Skip to main content

Module ir

Module ir 

Source
Expand description

In-memory intermediate representation.

This module is the contract every other phase consumes. Per 10-data-model.md, the shapes are stable for v0.1 — additive changes only, no renames or retypes.

Structs§

AccountId
AWS account id — exactly 12 ASCII digits.
Address
Terraform-style resource address.
AssumeRole
Optional assume_role { role_arn = "..." } sub-block of a provider.
Component
An apply-able component (Terraform “root module”).
ComponentId
Stable-within-a-run identifier for a Component.
Conditional
An HCL conditional cond ? then : else.
DependencyBlock
dependency "label" { config_path = "..."; mock_outputs = ... } block.
Edge
One dependency edge.
Environment
A named environment (staging, production, etc.).
ForExpr
An HCL for comprehension — captured verbatim when the evaluator cannot reduce it (typically because the source collection is unresolved).
FuncCall
An HCL function call — used both for unevaluated calls (when the evaluator cannot reduce the call, e.g. due to unresolved arguments) and as an intermediate representation during evaluation.
GenerateBlock
generate "label" { ... } block, captured verbatim. The parser does not write the file; consumers can synthesize it if needed.
IncludePath
One entry on the include load chain (deepest last).
Local
A locals { ... } entry.
Module
A reusable module body, addressed by ModuleId.
ModuleCall
A module "name" { source = "..."; ... } call site.
ModuleId
Stable-within-a-run identifier for a referenced Module.
ModuleSegments
Iterator over the module name segments of an Address.
Output
An output "name" {} declaration.
ProviderBlock
A provider "aws" {} declaration.
ProviderRef
A resource-side reference to a provider via provider = aws.<alias>.
Region
AWS region — matches ^[a-z0-9-]{1,32}$.
Resource
A resource or data block, post-evaluator. Phase 1 only defines the shape; population happens in Phase 3 (loader → IR) and onwards.
SourceFile
A single source file inside a Component.
Span
Byte-offset + line/column span into a source file.
StateBackend
Terraform state backend description.
Symbolic
A symbolic reference left unresolved by the evaluator.
TerragruntConfig
Per-component Terragrunt configuration.
Variable
A variable "name" {} declaration inside a component.
Workspace
The fully-parsed workspace, ready for export.

Enums§

BinaryOp
HCL binary operators.
BlockKind
Top-level HCL block kinds the loader distinguishes.
ComponentKind
Whether a Component is an apply-able root or a reusable module body.
EdgeKind
How an edge was discovered.
Expression
A possibly-resolved HCL expression.
FileExt
Recognised source-file extensions.
ModuleSource
Where a module "x" { source = "..." } call points.
ResourceKind
Whether an IR node was declared as resource or data.
SymbolKind
What an Expression::Unresolved refers to syntactically. Used by the dependency-graph phase to derive edges and by the exporter to emit the __kind__ discriminator in canonical JSON.
UnaryOp
HCL unary operators.
Value
A fully-resolved HCL value.

Constants§

ADDRESS_MAX_BYTES
Maximum byte length for any Address. Per [70-security.md § 4].
REGION_MAX_BYTES
Maximum byte length for any Region. Per [70-security.md § 4].

Type Aliases§

AttributeMap
Insertion-ordered association list of attribute name → expression. Used for every HCL body that has attributes (resource bodies, provider configs, module inputs, etc.).
Map
Insertion-ordered map of string key → Value.