Declaring a module
source field determines where the module comes from.
Source schemes
Local directory
GitHub
Strata registry
strata.ubiquex.io. Components published with ubx publish are available via the strata:// scheme.
Module directory structure
A module is a directory containing.xcl files with input, output, and resource declarations:
modules/vpc/main.xcl:
modules/vpc/outputs.xcl:
Using module outputs
Reference module outputs with dot notation:Pending<T> — they resolve at apply time like resource outputs.
Publishing a module
Publish to the Strata registry:STRATA_TOKEN environment variable or --token flag.
Validation
The typechecker validates:- Module source paths exist (for local sources)
- Input fields passed to the module match the module’s declared inputs
- Output references are declared in the module’s
outputblocks

