This update adds a new section explaining conditional expressions in HCL, including syntax, usage examples, and best practices for clarity and maintainability. The documentation covers how to use conditionals for default values, dynamic argument omission, and recommends using locals for complex logic.
Ref: #12806
Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
anshul/changelog_1.14.0
Ryan Johnson8 months agocommitted byJenna Goldstrich
HCL expresssions provide access to data exported by data sources and transforms and combines the data into other values. Learn how to use HCL expressions in Packer templates.
HCL expressions provide access to data exported by data sources and transforms and combines the data into other values. Learn how to use HCL expressions in Packer templates.
---
# HCL expressions reference
@ -143,6 +143,106 @@ The following named values are available:
For a full list of available functions, see [the function