Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何使用terragrunt导入模块?_Amazon Web Services_Amazon S3_Terraform_Terraform Provider Aws_Terragrunt - Fatal编程技术网

Amazon web services 如何使用terragrunt导入模块?

Amazon web services 如何使用terragrunt导入模块?,amazon-web-services,amazon-s3,terraform,terraform-provider-aws,terragrunt,Amazon Web Services,Amazon S3,Terraform,Terraform Provider Aws,Terragrunt,因此,当我通过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@githu

因此,当我通过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有关。 任何帮助都将不胜感激!
提前感谢。

如果您删除
模块。
terragrunt import module.terraform-aws-elasticsearch.aws\u elasticsearch\u domain.default elasticsearch
?运行
计划
命令查看将创建的每个资源以及每个资源的“地址”。然后在
import
命令中使用
aws\u elasticsearch\u域的“地址”。