title: How to import to module using terragrunt?
body: <p>So I'm having a hard time trying to <a href="https://www.terraform.io/docs/cli/commands/import.html#example-import-into-module" rel="nofollow noreferrer">import into module</a> when using a third-party module via terragrunt.</p>
  <p>My terragrunt.hcl file is as follows</p>
  <pre><code>locals {
    environment_vars = read_terragrunt_config(find_in_parent_folders(&quot;env.hcl&quot;))
    env = local.environment_vars.locals.environment
  }
  
  terraform {
    source = &quot;git::git@github.com:cloudposse//terraform-aws-elasticsearch.git//?ref=0.26.0&quot;
  }
  
  include {
    path = find_in_parent_folders()
  }
  </code></pre>
  <p>I was trying to import by using</p>
  <pre><code>terragrunt import module.terraform-aws-elasticsearch.aws_elasticsearch_domain.default elasticsearch
  </code></pre>
  <p>But I keep getting this error</p>
  <pre><code>Error: Import to non-existent module
  
  module.terraform-aws-elasticsearch is not defined in the configuration. Please add configuration for this module before importing into it.
  
  [terragrunt] 2021/01/25 15:23:26 Hit multiple errors:
  exit status 1
  </code></pre>
  <p>So I'm wondering what's the proper module name or if that's even possible to do with Terragrunt.
  Any help will be greatly appreciated!
  Thanks in advance.</p>