You can use terraform pow() function which calculates an exponent, by raising its first argument to the power of the second argument.
Open terraform console
1 2 |
## Open terraform console terraform console |
Get the power of a number in terraform
1 2 3 4 |
## Get power of a number pow(3,2) ## returns 9 pow(2,3) ## returns 8 pow(2,0) ## returns 1 |