title: Terraform - access root module script from child module
body: <p>I have a <strong>ROOT_MODULE</strong> with <code>main.tf</code>:</p>
  <pre><code>#Root Module - Just run the script
  resource &quot;null_resource&quot; &quot;example&quot; {
    provisioner &quot;local_exec&quot; {
      command = &quot;./script.sh&quot;
  }
  </code></pre>
  <p>and <code>script.sh</code>:</p>
  <pre><code>echo &quot;Hello world
  </code></pre>
  <p>now I have another directory elsewhere where I've created a <strong>CHILD_MODULE</strong> with another <code>main.tf</code>:</p>
  <pre><code>#Child Module
  module &quot;ROOT_MODULE&quot; {
    source = &quot;gitlabURL/ROOT_MODULE&quot;
  }
  </code></pre>
  <p>I've exported my planfile:  <code>terraform plan -out=&quot;planfile&quot;</code>
  however, when I do <code>terraform apply</code> against the planfile, the directory I am currently in no longer has any idea where the script.sh is. I need to keep the script in the same directory as the root module. This script is also inside a gitlab repository so I don't have a local path to call it. <em>Any idea as to how I can get this script into my child module / execute it from my planfile?</em></p>
  <pre><code>Error running command './script.sh': exit status 1. Output: cannot access 'script.sh': No such file or directory
  </code></pre>