title: Do terraform modules need required_providers?
body: <p>I'm a little confused about what I'm reading in the terraform documentation.  Here's what it says about modules:</p>
  <p><a href="https://www.terraform.io/docs/language/modules/index.html" rel="noreferrer">https://www.terraform.io/docs/language/modules/index.html</a></p>
  <blockquote>
  <p>Modules are containers for multiple resources that are used together. A module consists of a collection of .tf and/or .tf.json files kept together in a directory.</p>
  </blockquote>
  <p>Here's what it says about providers:
  <a href="https://www.terraform.io/docs/language/providers/requirements.html" rel="noreferrer">https://www.terraform.io/docs/language/providers/requirements.html</a></p>
  <blockquote>
  <h1>Requiring Providers</h1>
  <p>Each Terraform module <strong>must</strong> declare which providers it requires, so that Terraform can install and use them. Provider requirements are declared in a required_providers block.</p>
  <p>A provider requirement consists of a local name, a source location, and a version constraint:</p>
  <pre><code>terraform {
   required_providers {
      mycloud = {
        source  = &quot;mycorp/mycloud&quot;
        version = &quot;~&gt; 1.0&quot;
     }
   }
  }
  </code></pre>
  </blockquote>
  <p>I'm confused about this because I never have specified <code>required_providers</code> in any of my modules, even though I'm using providers and it says I must do so. I didn't even know the documentation said this until today.</p>
  <p>So am I misinterpreting the documentation, or is the documentation wrong? Does each of my modules need <code>required_providers</code> or not? My terraform configuration definitely works without them, so are they defaulting to something? If yes, how and where?</p>