title: Terraform github_repository 401 in module but works in main scope
body: <p>I have a github provider declared with a personal access token.
  Trying to create a repository like the following works:</p>
  <pre><code>resource &quot;github_repository&quot; &quot;test&quot; {
    name = &quot;test&quot;
    visibility = &quot;private&quot;
  }
  </code></pre>
  <p>However, I want to create something reusable. Whenever I try to create that exact same <code>github_repository</code> from a submodule, I get the following error:</p>
  <pre><code>╷
  │ Error: POST https://api.github.com/user/repos: 401 Requires authentication []
  │
  │   with module.test.module.repository.github_repository.test,
  │   on modules\serverless_api_repository\main.tf line 1, in resource &quot;github_repository&quot; &quot;source_code&quot;:
  │    1: resource &quot;github_repository&quot; &quot;test&quot; {
  │
  ╵
  </code></pre>
  <p>Why can't I create a <code>github_repository</code> from a submodule, when it works in the main scope?</p>