In Terraform I can use:
name = "${var.names["apple"])"
which looks up the string "apple" in var.names.
However, this syntax would break in most programming languages as it would try and parse "${var.names[" then apple then "])".
I've looked up documentation on this but failed to find anything. Are there any details?
I've read:
https://www.terraform.io/docs/configuration/syntax.html and https://www.terraform.io/docs/configuration/interpolation.html
The last link briefly gives an example
template = "${file("templates/web_init.tpl")}"
but doesn't explain.