nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #102

Which of the following is not a valid string function in Terraform?

The correct answer is C. slice. Terraform has a set of built-in string functions that include split (splits a string into a list by a delimiter), join (joins list elements into a string with a delimiter), and chomp (removes trailing newline characters). However, 'slice' is not a string function in Terraform - i

Submitted by noor.lb· Apr 18, 2026Work with Terraform Configurations

Question

Which of the following is not a valid string function in Terraform?

Options

  • Asplit
  • Bjoin
  • Cslice
  • Dchomp

How the community answered

(47 responses)
  • A
    2% (1)
  • C
    96% (45)
  • D
    2% (1)

Explanation

Terraform has a set of built-in string functions that include split (splits a string into a list by a delimiter), join (joins list elements into a string with a delimiter), and chomp (removes trailing newline characters). However, 'slice' is not a string function in Terraform - it is a collection function that extracts a subset from a list or tuple, not a string. Therefore, 'slice' is the invalid string function among the choices.

Topics

#Terraform functions#String manipulation#Built-in functions

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice