title: How to use if else-if else condition in Terraform
body: <p>I am trying to change the stack name based on the environment. I tried the following:</p>
  
  <pre><code>stack_name = "intl-${var.intl_region}-${var.intl_ctry}-${var.intl_env}-jk-${var.vanity_env == "-np" || var.vanity_env == "-dr"} ? "mstr" : "master"}"
  </code></pre>
  
  <p>but getting the following error:</p>
  
  <blockquote>
    <p>Error: Error parsing
    /build_workspace/workspace/GCM/PIPE_JENKINS/main.tf: At 33:25: nested
    object expected: LBRACE got: ASSIGN</p>
  </blockquote>
  
  <p>Can some please help me how can I change the stack name based on the environment?</p>
  
  <p>It should be like:</p>
  
  <pre><code>if a == a || b ? "c ": "d"
  </code></pre>
  
  <p>so:</p>
  
  <pre><code>a==b==c else d
  </code></pre>