hands-on lab

Working with Terraform Functions

Difficulty: Intermediate
Duration: Up to 45 minutes
Students: 82
Rating: 5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Terraform Functions can be used in an application to dynamically retrieve or manipulate the configuration values of your cloud resources.

Use cases of Terraform functions include:

  • Capturing or displaying timestamps
  • Encoding or decoding sensitive information
  • Referencing elements from a map or list
  • Reading the contents of a configuration file

Terraform functions, along with input variables, allow developers to abstract specific values from their infrastructure as code as they strive to create resource definitions that are entirely reusable.

In this lab, you will work with the Terraform console to evaluate the various built-in function types. You will also incorporate a common Terraform function into an application to deploy an EC2 instance.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Use the Terraform Console to evaluate function calls
  • Use Terraform functions in an application deployment

Intended Audience

  • Cloud Architects
  • DevOps Engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Terraform Console
  • Terraform Functions
  • Amazon EC2

The following content can be used to fulfill the prerequisite:

Covered topics

Lab steps

Configure Terraform AWS Credentials
Observing Functions with the Terraform Console
Configuring Dynamic User Data with Terraform Functions