Interview Prep/Terraform/Loops, Conditionals, Dynamic Blocks and Functions

Is `"${var.name}"` different from `var.name`?

BeginnerConceptLoops, Conditionals, Dynamic Blocks and Functions
Answer

In Terraform 0.12 and later, a lone "${var.name}" is redundant; write var.name directly. Interpolation is only needed when combining with other text, like "${var.app}-${var.env}". Linters such as tflint flag the old style.

All Terraform questions Roadmap: Terraform

More on Loops, Conditionals, Dynamic Blocks and Functions