Files
opentf/internal/lang/exprs/evalable.go
Martin Atkins 05c6507615 lang/exprs: Implement FunctionCalls for "just attributes" bodies
I previously skipped this because I was considering trying to change our
HCL fork to return hcl.StaticCall from the "Functions" method instead of
(ab)using hcl.Traversal, but since I didn't actually follow through on that
I'm instead now making this work with the same caveat previously accepted
for schema-based body decoding: we return incomplete hcl.StaticCall objects
that only specify the name and source range, omitting the arguments.

This is enough for the reference analysis needed to populate the evaluation
scope, and now makes it possible to call functions from the definitions of
input variables in a module call because those are decoded in "just
attributes" mode instead of using a hcldec schema. The FIXME comment added
here matches the one in the other FunctionCalls implementations elsewhere
in this file, to remind us to update all of them once the upstream HCL API
changes.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2026-03-02 07:03:53 -08:00

15 KiB