TA-002-P · Question #94
HashiCorp Configuration Language (HCL) supports user-defined functions.
The correct answer is B. False. HCL is a declarative configuration language that provides only built-in functions; user-defined functions are not supported.
Question
HashiCorp Configuration Language (HCL) supports user-defined functions.
Options
- ATrue
- BFalse
How the community answered
(39 responses)- A5% (2)
- B95% (37)
Why each option
HCL is a declarative configuration language that provides only built-in functions; user-defined functions are not supported.
This is false because HCL's specification explicitly excludes user-defined function support; users are limited to the curated set of built-in functions provided by the Terraform runtime.
HashiCorp Configuration Language intentionally omits support for user-defined functions to keep configurations declarative, readable, and free from hidden side effects. All callable functions such as 'merge()', 'lookup()', and 'toset()' are built into the Terraform runtime and cannot be extended or overridden by users. This design constraint prevents configurations from becoming imperative scripts and maintains the language's predictability.
Concept tested: HCL built-in functions and user-defined function restrictions
Source: https://developer.hashicorp.com/terraform/language/functions
Topics
Community Discussion
No community discussion yet for this question.