0
0
Terraformcloud~5 mins

Numeric functions (min, max, ceil) in Terraform - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the min() function do in Terraform?
The min() function returns the smallest number from a list of numbers provided.
Click to reveal answer
beginner
How does the max() function behave in Terraform?
The max() function returns the largest number from a list of numbers provided.
Click to reveal answer
beginner
Explain the purpose of the ceil() function in Terraform.
The ceil() function rounds a number up to the nearest whole number (integer).
Click to reveal answer
beginner
What will min(3.7, 2.1, 5) return in Terraform?
It will return 2.1 because it is the smallest number among the inputs.
Click to reveal answer
beginner
What is the result of ceil(4.2) in Terraform?
The result is 5 because ceil() rounds 4.2 up to the next whole number.
Click to reveal answer
What does max(1, 4, 2) return in Terraform?
A7
B1
C2
D4
Which function rounds a number up to the nearest integer?
Aceil()
Bmax()
Cmin()
Dfloor()
What will min(10, 20, 5) output?
A10
B5
C20
D15
If you want the largest number from a list, which function do you use?
Amin()
Bceil()
Cmax()
Dround()
What does ceil(7.0) return?
A7
B8
C6
D7.5
Describe how the min(), max(), and ceil() functions work in Terraform.
Think about picking smallest, largest, or rounding up numbers.
You got /3 concepts.
    Give an example of when you might use the ceil() function in cloud infrastructure configuration.
    Consider situations where partial resources don't make sense.
    You got /3 concepts.