Concat 2 variables or 1 variable and free text with Terraform Version 0.12.18

When using the new Syntax with version 0.12.x it is not possible to write anymore the following line of code: name = "My-Bucket${var.bucket_prefix}"

With the new version you need to write for the variable part just: var.bucket_prefix
But how can I add the My-Bucket in front without any special character?

Hi @VF-mbrauer,

The syntax you have shown is correct for both Terraform 0.11 and Terraform 0.12.

What they want to achieve with the new syntax is to differentiate between full-blown string interpolations and simple variable references:

This is an interpolation: name = "My-Bucket${var.bucket_prefix}"
This is a reference: bucket =`

Previously, we had to do interpolations all the time and the output was always a string. Now, we don’t have to do it for simple references and we can take advantage of the complex datatypes much better.

I’d guess that interpolations also use more memory and cpu, so the plan/apply will use less resources with the new syntax.

But interpolations are still valid syntax, and they are often needed - just not always