2

因此,当通过 terragrunt 使用第三方模块时,我很难尝试导入模块。

我的 terragrunt.hcl 文件如下

locals {
  environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
  env = local.environment_vars.locals.environment
}

terraform {
  source = "git::git@github.com:cloudposse//terraform-aws-elasticsearch.git//?ref=0.26.0"
}

include {
  path = find_in_parent_folders()
}

我试图通过使用导入

terragrunt import module.terraform-aws-elasticsearch.aws_elasticsearch_domain.default elasticsearch

但我不断收到此错误

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

所以我想知道正确的模块名称是什么,或者这是否可能与 Terragrunt 有关。任何帮助将不胜感激!提前致谢。

4

0 回答 0