title: If-else condition in terraform data source
body: <p>My question is very simple but unable to find any example or solution on the entire internet. I want to use the if-else condition in the <code>data source</code> of terraform and based on the value it should search the result. We have 2 different VPCs in our AWS account: 1. Prod VPC, 2. RDS VPC</p>
  <p>Filter should work based on boolean variable var.rds_vpc</p>
  <p>Pseudocode:</p>
  <pre><code>data &quot;aws_vpc&quot; &quot;vpc&quot; {
    if var.rds_vpc == true:
      tags = {
        Name = &quot;rds_vpc&quot;
        Type = &quot;database&quot;
      }
    else:
      tags = {
        Cluster     = &quot;live_vpc&quot;
        Enviornment = &quot;production&quot;
      }
  
  }
  </code></pre>
  <p>If both VPCs could have similar tags, I could simply pass the values via variables. But in the above case, the tags are also different.</p>
  <p>I would highly appreciate it if someone can help.</p>