concept
String interpolation and escaping
Combine text and expressions with interpolation; use quoted escapes or multiline heredocs, and double opening markers to preserve literal template syntax.
Formal Syntax & Structure
terraform syntaxterraform
String interpolation and escapingWorking Example
Example Snippetterraform
variable "service" { type = string default = "catalog"}
variable "environment" { type = string default = "dev"}
output "name" { value = "${var.service}-${var.environment}"}