title: Excluding resource in Terraform module
body: <p>I have a Terraform module which I built that deploys two instances of the module to a separate region. In this module there is a key vault. I only want the key vault to be present in one of the two regions. </p>
  
  <p>Here is my module:</p>
  
  <pre><code>resource "azurerm_resource_group" "test" {
    name     = "test"
    location = "${var.location}"
  }
  
  resource "azurerm_key_vault" "keyvault" {
    name = "keyvault"
  }
  </code></pre>
  
  <p>Here is my main.tf</p>
  
  <pre><code>module "test_uswest2" {
    source = "modules/test"
  
    location = "westus2"
    environment = "${var.environment}"
  }
  
  module "test_westcentralus" {
    source = "modules/test"
  
    location = "centralus"
    environment = "${var.environment}"
  }
  </code></pre>
  
  <p>I want to exclude the key vault in the second region/location.</p>
  
  <p>Terraform doesn't seem to support if/else so I'm not sure what my options are.</p>