You can use terraform ceil() or floor() function to round a fraction to the nearest whole number.
Open terraform console
1 2 |
## Open terraform console terraform console |
Round a fraction to the nearest whole number in terraform
1 2 3 4 5 6 7 8 9 10 11 12 13 |
## ceil returns the closest whole number that is greater than or equal to the given value ceil(5.9) ## Returns 6 ceil(5.1) ## Also returns 6 ## floor returns the closest whole number that is less than or equal to the given value floor(5.9) ## Returns 5 floor(5.1) ## Also returns 5 |