Amazon web services 如何使用terragrunt导入模块?
因此,当我通过terragrunt使用第三方模块时,我很难做到这一点 我的terragrunt.hcl文件如下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
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域的“地址”。