title: Why is terraform ignoring my terragrunt inputs?
body: <p>Recently I took over a terraform &amp; terragrunt project a previous person worked on, and unfortunately I can not get it to work properly, meaning that the terragrunt inputs are totally ignored by terraform.</p>
  <pre><code>TERRAFORM_VERSION: 1.2.8
  TERRAGRUNT_VERSION: 0.38.8
  </code></pre>
  <p>Here is the folder structure:</p>
  <pre><code>tf
  ├── terraform
  │   └── aws
  │       ├── modules
  │       │   └── testapp
  │       │       ├── main.tf
  │       │       ├── outputs.tf
  │       │       └── provider.tf
  │       └── resources
  │           └── testapp
  │               ├── main.tf
  │               └── variables.tf
  └── terragrunt
      ├── env
      │   └── test
      │       ├── env.yaml
      │       └── testapp
      │           └── terragrunt.hcl
      └── terragrunt.hcl
  </code></pre>
  <p>Content of files:</p>
  <p><strong>terragrunt testapp terragrunt.hcl:</strong></p>
  <pre><code>terraform {
    source = &quot;/tf/terraform/aws//modules/testapp&quot;
  }
  
  include &quot;root&quot; {
    path = find_in_parent_folders()
  }
  
  locals {
    env = yamldecode(file(find_in_parent_folders(&quot;env.yaml&quot;)))
  }
  
  inputs = {
    name = &quot;whatever-test&quot;
  }
  </code></pre>
  <p><strong>modules testapp main.tf:</strong></p>
  <pre><code>module &quot;test&quot; {
    source = &quot;/tf/terraform/aws/resources/testapp&quot;
  }
  </code></pre>
  <p><strong>resources testapp main.tf:</strong></p>
  <pre><code>resource &quot;aws_iam_policy&quot; &quot;test_policy&quot; {
    name   = &quot;test-${var.name}-policy&quot;
    ...etc...
  }
  </code></pre>
  <p><strong>resources testapp variables.tf:</strong></p>
  <pre><code>variable &quot;name&quot; {
    type = string
  }
  </code></pre>
  <p>When running the apply command, I get the following error, and cant figure out why the variable is ignored:</p>
  <pre class="lang-bash prettyprint-override"><code>terragrunt apply --terragrunt-source-update --terragrunt-config /tf/terragrunt/env/test/testapp/terragrunt.hcl
  
  
  │ Error: Missing required argument
  │
  │   on main.tf line 1, in module &quot;test&quot;:
  │    1: module &quot;test&quot; {
  │
  │ The argument &quot;name&quot; is required, but no definition was found.
  ╵
  ERRO[0030] Terraform invocation failed in /tf/.terragrunt-cache/EsgHHSh0qo-NO_uijOaMYnlcMZI/bmBahUj5mD_HVKsk-dPyhY4f1cA/modules/testapp  prefix=[terragrunt/env/test/testapp]
  ERRO[0030] 1 error occurred:
          * exit status 1
  </code></pre>
  <p>I dont get why terragrunt source points towards a module file, instead of pointing to the resources, but unfortunately the whole project is done this way, and refactoring it would take a long time and its not on the priority list right now. In this case, what can I do to make terraform see my inputs from terragrunt?</p>
  <p>Here is also the content of some of the other files:</p>
  <p><strong>terragrunt test env.yaml:</strong></p>
  <pre><code>environment: &quot;test-env&quot;
  region: &quot;eu-west-1&quot;
  </code></pre>
  <p><strong>terragrunt root terragrunt.hcl:</strong></p>
  <pre><code>remote_state {
    backend = &quot;s3&quot;
  
    config = {
      encrypt                      = true
      region                       = &quot;eu-west-1&quot;
      key                          = &quot;${path_relative_to_include()}/terraform.tfstate&quot;
      bucket                       = &quot;tf-state&quot;
      dynamodb_table               = &quot;test-table&quot;
      skip_bucket_accesslogging    = true
      disable_aws_client_checksums = true
      s3_bucket_tags = {
        name = &quot;test&quot;
      }
    }
  }
  
  </code></pre>
  <p>A help would be really appreciated with this. Thank you!</p>