You can use terraform parseint() function which parses the given string as a representation of an integer in the specified base and returns the resulting number. The base must be between 2 and 62 inclusive.
Convert binary hexadecimal or octal number to a decimal number in terraform
1 2 3 4 5 6 7 8 |
## Binary to decimal parseint("10000", 2) ## returns 16 ## Octal to decimal parseint("20", 8) ## returns 16 ## Hexadecimal to decimal parseint("10", 16) ## returns 16 |