Member-only story

Functions | Terraform

Always learning
12 min readJan 18, 2025

Terraform functions are built-in, reusable code blocks that perform specific tasks within Terraform configurations.

The Terraform language does not support user-defined functions, so only the functions built into the language are available for use.

A built-in function is a function that is already available in a programming language, application, or another tool that can be accessed by end users.

Supported built-in functions

☑ abs(float)

☑ file(path), floor(float), formatlist(format, args, …)

☑ indent(numspaces, string), join(delim, list)

☑ keys(map), length(list), list(items, …), map(key, value, …)

☑ replace(string, search, replace), slice(list, from, to)

☑ split(delim, string), timestamp()

☑ values(map)

Types of Functions

  • Numeric
  • String
  • Collection
  • Encoding
  • File system
  • Date & Time
  • Hash & Crypto

Read more function-type

Key Concepts

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Always learning
Always learning

Written by Always learning

கற்றுக் கொள்ளும் மாணவன்...

No responses yet

What are your thoughts?