title: multi region deployment using terraform providers?
body: <p>I've structured a <code>terraform</code> code to deploy different types of resources to a single <code>AWS</code> region. The code structure is like this:</p>
  <pre><code>- main.tf
  - data.tf
  - providers.tf
  - variables.tf
  - templates/
  - modules/
    - module_main.tf
    - data.tf
    - variables.tf
    - modules/
      - sub_module_main.tf
      - data.tf
      - variables.f
  </code></pre>
  <p>So the idea is to create a group of resources with similar characteristics using the outer module. Then outer module uses the inner module for the same purpose.
  Inside the inner module, it creates an S3 bucket. Now for each bucket inside the inner module I want to create a replication bucket in a different region. So the replication bucket is the only resource that I need to deploy in a second region. I read about having two aws providers and then pass specific provider to the module like:</p>
  <pre><code>module 'east' {
    source = ./..
    providers = {
      aws = aws.east
    }
    ...
  }
  
  module 'west' {
    source = ./..
    providers = {
      aws = aws.west
    }
    ...
  }
  </code></pre>
  <p>But in my case I just want to deploy specific resources inside the module to both regions not the whole module. Given my code structure is it possible to handle this requirement using providers or any other method?</p>