Introduction
Sometimes you need to change the type of a value in Terraform to make it work with other parts of your configuration. Type conversion functions help you turn one type of data into another, like changing a number into a string or a list into a set.
When you want to join numbers and text together in a message.
When you need to convert a list of strings into a set to remove duplicates.
When you want to convert a string that looks like a number into an actual number to do math.
When you need to change a map into a list to loop over its values.
When you want to make sure a value is treated as a boolean true or false.