Questions tagged [terragrunt]

Terragrunt is a thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules.

Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your Terraform configurations DRY, working with multiple Terraform modules, and managing remote state.

Check out the terragrunt-infrastructure-modules-example and terragrunt-infrastructure-live-example repos for fully-working sample code that demonstrates this new folder structure.

284 questions
0
votes
1 answer

terragrunt cannot access module outputs

I'm struggling with Terragrunt (I'm still quite new). I can describe my problem even using pure Terragrunt repo examples: Looking…
Michael
  • 129
  • 2
  • 10
0
votes
1 answer

Terragrunt for_each value, can't retrieve data in other resources

I have an issue with my terragrunt/terraform code as below. I don't know the right way to retrieve my both crawlers created by my for_each loop. Normally I create it with for and count. I can't retrieve the correct values in my action triggers…
0
votes
0 answers

How to refer to other resources and outputs in Terragrunt?

I was following this tutorial for multi-env deployment with Terragrunt in GCP: https://harjot.me/blog/deploying-docker-containers-to-gke-using-terraform/ As you can see he didn't finish the gcp-sql moudule example and now I don't know how do I refer…
0
votes
1 answer

Template for multiple environment terragrunt gcp project?

I want to start a new Terraform project that will deploy resources on a GCP account. I want to use Terragrunt to provision multiple environments (test,dev,prod). Essentially each environment will be the same except the names of the resources will…
KatranPlague
  • 117
  • 1
  • 12
0
votes
1 answer

How do I make my data template file recognise a number in terraform

THe problem I am facing now is this. I am trying to make my policy more flexible. So I shifted them into a file instead of using EOF. How to make the template file recognise a number value? "${max_untagged_images}" and "${max_tagged_images}" are…
shadow
  • 800
  • 2
  • 16
  • 33
0
votes
1 answer

Terragrunt dependency list output as inputs

I have two entrypoints: s3 and do_something. s3 is a dependency for do_something and has the following code: terragrunt.hcl aws_regions = [ "us-east-1", "eu-east-1" ] inputs = { build_bucket = { "${local.aws_regions[0]}" = { name =…
0
votes
2 answers

Move existing infra from terraform infra into terragrunt

I have my existing code in terraform and my infra is up and running in aws .Now I would liek to move to terragrunt , but can I move my terraform code into terragrunt ? similar to terraform mv command do we have anything in terragrunt ?
LKK
  • 13
  • 8
0
votes
1 answer

How to call Terragrunt HCL files from Terratest Go script?

I have a terragrunt script which is working fine after running terragrunt apply-all command line but same thing i am not able to do/invoke form Go script. using TgApplyAll function Below is my Go script Working terragrunt script is kept in…
0
votes
0 answers

Terraform Dependancies between accounts

I'm running into an issue using the AWS SES service. Ideally I'd like to setup the entire service using Terraform/Terragrunt. Unfortunately I can't seem to wrap my head around how to go about it. To setup the SES domain, I need to verify against the…
TravelingLex
  • 399
  • 1
  • 3
  • 16
0
votes
0 answers

Losing sync with state in TFC (local execution) when clearing terragrunt cache

I have an AWS ou/account/infra deployment automation pipeline I am working on that uses terragrunt, terraform, and terraform cloud to deploy accounts to an AWS org. I am using local execution in TF Cloud, so I run it locally on my machine at this…
0
votes
1 answer

Trouble with outputting vars with modules

I'm attempting to use modules to create several elements within Azure. Directory structure looks like . ├── azure-provider.tf ├── backend.tf ├── rg │   ├── azure-provider.tf │   ├── backend.tf │   ├── main.tf │   ├── outputs.tf │   ├──…
Craig
  • 1
  • 2
0
votes
1 answer

Terragrunt plan-all auto-init doesn't seem to be working

I'm running into an issue where running terragrunt plan-all is requiring me to run a "terragrunt init" first .. reading https://terragrunt.gruntwork.io/docs/features/auto-init/#auto-init .. it says that it should "auto-init", but that doesn't seem…
0
votes
0 answers

how to inject a env variables in a common.tfvars

how to inject a env variables in a common.tfvars file ex export TF_VAR_ENV="test" and use this in a common.tfvars environment = "{get_env("TF_VAR_ENV", "")}" /// i don't know what is good syntax for that Thank in advance for your…
breizh5729
  • 174
  • 2
  • 9
0
votes
1 answer

How to access terragrunt variables in terraform code

I have terragrunt config where have declared the variables using locals as below at root level. In the child module , have declared the child terragrunt config file called (terragrunt.hcl). parent terragrunt file has following code : locals { …
user2315104
  • 2,378
  • 7
  • 35
  • 54
0
votes
2 answers

Terragrunt converts map to string

In my terragrunt.hcl file I pass few variables to a module - one of them is map and list terraform { source = "git@github.com:/infrastructure-modules.git//iam?ref=v.0.0.9" } include { path = find_in_parent_folders() } inputs = { …
potatopotato
  • 1,024
  • 2
  • 16
  • 38