TERRAFORM-ASSOCIATE-003 · Question #178
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?
The correct answer is B. max(numcpus). 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…
Question
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?
Options
- Atop(numcpus)
- Bmax(numcpus)
- Cceil (numcpus)
- Dhight[numcpus]
How the community answered
(50 responses)- A4% (2)
- B70% (35)
- C18% (9)
- D8% (4)
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.
Topics
Community Discussion
No community discussion yet for this question.