From the course: Advanced Terraform

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Expressions and functions

Expressions and functions - Terraform Tutorial

From the course: Advanced Terraform

Expressions and functions

- [Instructor] Developing configurations in Terraform is similar to developing software. HashiCorp Configuration Language, or HCL, is a domain-specific language, or DSL. DSLs are limited languages that share some but not all of the features of a fully featured language, like Java or C#. Fully featured languages support expressions and user-defined functions. HCL supports expressions and a library of predefined functions. An expression is a statement that can be evaluated by the Terraform CLI. This can be a simple literal value, a mathematical or a conditional statement, and calling a Terraform function. HCL does not support user-defined functions. Instead, Terraform includes a set of built-in functions. Terraform functions allow for things like string manipulation, working with data structures, IP subnets, and more. We won't be deploying this configuration just yet, so you don't need to worry about setting up the .tfrs…

Contents