mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
The HCL "dynblock" extension blurs the distinction between static structure and dynamic expressions by allowing the use of expressions to generate zero or more nested blocks. Because this feature is a bit of a layering violation it requires some different usage patterns to get the correct result, and so this new EvalableHCLBodyWithDynamicBlocks aims to encapsulate those details so that the caller can just treat the result like a normal Evalable. lang/eval now uses this for the body of a resource configuration, so that "dynamic" blocks can work in there similarly to how they do in the previous language runtime. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>