So I'm having a hard time trying to import into module when using a third-party module via terragrunt.
My terragrunt.hcl file is as follows
locals {
environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
env = local.environment_vars.locals.environment
}
terraform {
source = "git::[email protected]:cloudposse//terraform-aws-elasticsearch.git//?ref=0.26.0"
}
include {
path = find_in_parent_folders()
}
I was trying to import by using
terragrunt import module.terraform-aws-elasticsearch.aws_elasticsearch_domain.default elasticsearch
But I keep getting this error
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
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.
question from:
https://stackoverflow.com/questions/65878969/how-to-import-to-module-using-terragrunt 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…