title: condition on terraform module
body: <p>Trying to run modules conditionally.</p>
  <p>Expectation : Run module only when env is not equal to prd</p>
  <pre><code>    module &quot;database_diagnostic_eventhub_setting&quot; {
        count       = var.env != &quot;prd&quot; ? 1 : 0     // run block if condition is satisfied 
        source      = &quot;git::https://git_url//modules/....&quot;
        target_ids  =  [
          &quot;${data.terraform_remote_state.database.outputs.server_id}&quot;
        ]
        environment = &quot;${var.environment}-database-eventhub&quot;
        destination = data.azurerm_eventhub_namespace_authorization_rule.event_hub.id
        eventhub_name = var.eventhub_name
        logs = [
          &quot;PostgreSQLLogs&quot;,
          &quot;QueryStoreWaitStatistics&quot;
        ]
      }
  </code></pre>
  <p>Error:</p>
  <pre><code>The name &quot;count&quot; is reserved for use in a future version of Terraform.
  </code></pre>