ExamGecko
Question list
Search
Search

Question 167 - Terraform Associate 003 discussion

Report
Export

You have a list of numbers that represents the number of free CPU cores on each virtual cluster:

What Terraform function could you use to select the largest number from the list?

A.
top(numcpus)
Answers
A.
top(numcpus)
B.
max(numcpus)
Answers
B.
max(numcpus)
C.
ceil (numcpus)
Answers
C.
ceil (numcpus)
D.
hight[numcpus]
Answers
D.
hight[numcpus]
Suggested answer: B

Explanation:

In Terraform, the max function can be used to select the largest number from a list of numbers. The max function takes multiple arguments and returns the highest one. For the list numcpus = [18, 3, 7, 11, 2], using max(numcpus...) will return 18, which is the largest number in the list.

Terraform documentation on max function: Terraform Functions - max

asked 18/09/2024
Tyler Andringa
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first