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
Question
Options
- Asplit
- Bjoin
- Cslice
- Dchomp
How the community answered
(47 responses)- A2% (1)
- C96% (45)
- D2% (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
Community Discussion
No community discussion yet for this question.