Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
747 views
in Technique[技术] by (71.8m points)

amazon web services - How to import to module using terragrunt?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...