Module expr

Source
Expand description

Types to represent the HCL expression sub-language.

The module contains the Expression enum which can represent any valid HCL expression in HCL attribute values and templates.

Structs§

BinaryOp
An operation that applies an operator to two expressions.
Conditional
The conditional operator allows selecting from one of two expressions based on the outcome of a boolean expression.
ForExpr
A for expression is a construct for constructing a collection by projecting the items from another collection.
FuncCall
Represents a function call expression with zero or more arguments.
FuncCallBuilder
A builder for function calls.
FuncName
Type representing a (potentially namespaced) function name.
Heredoc
A heredoc template expression is introduced by a << sequence and defines a template via a multi-line sequence terminated by a user-chosen delimiter.
Traversal
Traverse an expression to access attributes, object keys or element indices.
TraversalBuilder
A builder for expression traversals.
UnaryOp
An operation that applies an operator to one expression.
Variable
A type representing a variable in an HCL expression.

Enums§

BinaryOperator
An operator that can be applied to two expressions.
Expression
A type representing the expression sub-language. It is used in HCL attributes to specify values and in HCL templates.
HeredocStripMode
The strip behaviour for the template contained in the heredoc.
ObjectKey
Represents an object key.
Operation
Operations apply a particular operator to either one or two expression terms.
TemplateExpr
A template expression embeds a program written in the template sub-language as an expression.
TraversalOperator
The expression traversal operators that are supported by HCL.
UnaryOperator
An operator that can be applied to an expression.

Functions§

to_expression
Convert a T into hcl::Expression which is an enum that can represent any valid HCL attribute value expression.

Type Aliases§

Object
The object type used in the expression sub-language.