You can use terraform max() function which takes one or more numbers and returns the greatest number from the set.
Open terraform console
1 2 |
## Open terraform console terraform console |
Get the number with maximum value in terraform
1 2 |
max(30,10,20) ## returns 30 max(30.5,10,-20.7) ## returns 30.5 |
Get the max value from a list of numbers in terraform
1 |
max([30,10,20]...) ## returns 30 |