title: Terraform: How to get a boolean from interpolation?
body: <p>I want to use an interpolated value for the <code>prevent_destroy</code> meta-parameter</p>
  
  <p>When I code</p>
  
  <pre><code>lifecycle {
     # never destroy the IP address of the production stage,
     prevent_destroy = "${var.stage_name == "global" ? true : false }"
  }
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>* cannot parse 'prevent_destroy' as bool: strconv.ParseBool: parsing "${var.stage_name == \"global\" ? true : false }": invalid syntax
  </code></pre>
  
  <p>Equivalent error for</p>
  
  <pre><code>lifecycle {
      prevent_destroy = "${var.stage_name == "global" ? 1 : 0 }"
  }
  </code></pre>
  
  <p>When I define a local the definition</p>
  
  <pre><code>locals  {
    booltest = "${var.stage_name == "global" ? true : false }"
  }
  </code></pre>
  
  <p>seems to go through, but referring to the local</p>
  
  <pre><code>lifecycle {
      prevent_destroy = "${var.booltest}"
  }
  </code></pre>
  
  <p>gives me a</p>
  
  <pre><code>* cannot parse 'prevent_destroy' as bool: strconv.ParseBool: parsing "${var.booltest}": invalid syntax
  </code></pre>
  
  <p>(also tried with 0 and 1)</p>
  
  <p>How can this be coded? My version is <code>Terraform v0.11.10</code></p>