From the course: Advanced Terraform
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
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
-
-
-
-
Input variables5m 52s
-
(Locked)
Using input variables6m 23s
-
(Locked)
Output variables5m 50s
-
(Locked)
Sensitive data4m 10s
-
(Locked)
Looping with count7m 59s
-
(Locked)
Looping with for_each3m 26s
-
(Locked)
Expressions and functions6m 33s
-
(Locked)
Introduction to modules2m 38s
-
(Locked)
Using Terraform modules3m 55s
-
-
-
-