Source Format
How HCL source code is packaged and provided as input to function-hcl.
This section walks through every feature of the function-hcl DSL, one topic at a time. Each page builds on concepts introduced earlier, so if you’re new to function-hcl, reading them in order is recommended.
The guide covers:
for_eachHow HCL source code is packaged and provided as input to function-hcl.
Understanding HCL’s fundamental constructs: blocks, attributes, expressions, and identifiers.
Accessing the Crossplane request state with the req variable.
Defining and scoping local variables.
Declaring individual composed resources.
Creating multiple resources with for_each.
Grouping related resources with shared locals.
Conditionally creating resources, groups, and collections.
Writing values back to the composite resource status.
Writing connection details to the composite resource.
Controlling resource readiness.
Sharing data with downstream pipeline steps.
Requesting extra resources from Crossplane.
Writing and invoking custom functions.