title: How to check the value is present in list or not using terraform 0.13.5?
body: <p>I need to check the value that exists in a variable or not and based on that I need to create resources.
  If <code>value_list</code> doesn't have these <code>values('abc','def','ghi')</code> it should not create the resource.</p>
  <p>What I'm trying here is:</p>
  <ol>
  <li>Converting the string variable  to list</li>
  <li>Check that list is having values 'abc' or 'def' or 'ghi'. If <code>value_list</code> contains any one of the values then proceed with the next steps to create resources.</li>
  <li>If <code>value_list</code> doesn't have these <code>values('abc','def','ghi')</code> it should not create the resource.</li>
  </ol>
  <p><strong>variables.tf</strong></p>
  <pre><code>variable &quot;value_list&quot; {
      default = &quot;abc,def,ghi&quot;
      type= string
  }
  </code></pre>
  <p><strong>resource.tf</strong></p>
  <pre><code>resource &quot;azurerm_kubernetes_cluster_node_pool&quot; &quot;user&quot; {
    value_list = ${split(&quot;,&quot;, var.value_list)}
    count = &quot;${contains(value_list,&quot;abc&quot;) ? 1 : 0 || contains(value_list,&quot;def&quot;) ? 1 : 0 || contains(value_list,&quot;ghi&quot;) ? 1 : 0 
  }
  </code></pre>
  <p><strong>Error:</strong></p>
  <p>This character is not used within the language.
  Expected the start of an expression, but found an invalid expression token.</p>
  <p>How to check if the value_list is having the desired value or not?</p>