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