Terraform string templates insert expression values into text. Built-in functions transform values before another expression uses them.
A function such as lower returns a new string; it does not edit the input variable or rename a resource address. Use these expressions to apply a naming rule consistently. Literal punctuation outside an interpolation remains part of the name, so an extra hyphen can matter to a provider. In this lesson, normalization changes a remote name and can therefore cause replacement in the lab provider. Inspect the resulting name rather than assuming the source text already follows the rule.
lower normalizes the value before it reaches the provider.