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
3
votes
0 answers

Missing required GCS remote state configuration location

After Google Cloud quota update, I can't run terragrunt/terraform code due to strange error. Same code worked before with other project on same account. After I tried to recreate project (to get new clear project) there was some "Billing Quota"…
3
votes
1 answer

Should terragrunt-generated files be added to source control?

Terragrunt documentation specifically addresses whether .terraform.lock.hcl files should be checked into source control repos. What is the recommendation for .tf files generated by terragrunt? Should they also be added to source control? If they are…
Paul
  • 53
  • 4
3
votes
5 answers

Terragrunt doesn't get outputs from a imported source

I've been following terragrunt docs and I end up with a structure like the following one: services/lb services/backend vpc I had set a dependency of vpc in services/lb and in services/backend and it works standalone making terragrunt run-all…
Géminis
  • 123
  • 2
  • 9
3
votes
3 answers

Cross region replication of AWS ECR repository

I am trying to replicate my AWS ECR repository to multiple regions within the same account using terraform. I tried manually from the AWS console it works fine but from terraform, I am not able to find the solution. What I tried: I tried to make a…
3
votes
1 answer

Using terragrunt generate provider block causes conflicts with require providers block in module

I'm using Terragrunt with Terraform version 0.14.8. My project uses mono repo structure as it is a project requirement to package Terragrunt files and Terraform modules together in a single package. Folder structure: project root: ├──…
Alex
  • 1,293
  • 1
  • 13
  • 26
3
votes
1 answer

Unable to setup environment variable in terraform local-exec provisioner running through Atlantis (Terraform Pull Request Automation) tool

I have successfully deployed AKS Using Terragrunt through Atlantis, Now I want to set credentials to communicate with the Kubernetes API Server. For that, I am setting up the KUBECONFIG Environment variable to authenticate with Kubernetes. Below is…
3
votes
0 answers

Terragrunt - How use outputs values in the same module

I am deploying different resources in terragrunt. I have a problem when in the same terragrunt.hcl I need access a ouputs generete in the same module. CODE EXAMPLE: # Include VPC outputs as this module is a dependency dependency "vpc" { …
Javier Torres
  • 33
  • 1
  • 4
2
votes
0 answers

Terragrunt dependencies for aws_ssm_parameter

I tried to figure out a good way to use AWS Parameter Store in my Terragrunt config. I created module secrets to create all my secret parameters: # secrets/main.tf resource "aws_ssm_parameter" "postgres_password" { name =…
2
votes
2 answers

Terragrunt with modules of terraform using local state instead of s3 remote state

I am using terragrunt to create an environment using the approach of storing the remote state into my local path. remote_state { backend = "local" config = { path= "../..//mypath/terraform.tfstate" } } but because terragrunt downloads…
2
votes
1 answer

IAM Role for Terragrunt

I am reviewing this website, https://terragrunt.gruntwork.io/docs/getting-started/quick-start/ where they discuss an IAM role for Terragrunt as in the following code provider "aws" { assume_role { role_arn =…
user3423536
  • 87
  • 1
  • 1
  • 11
2
votes
1 answer

How to enable basic authentication in Atlantis?

I'm trying to enable basic auth for atlantis I have followed the official docs here however it seems the below settings are not honored by atlantis docker run runatlantis/atlantis:v0.18.1 server --gitlab-user=username --gitlab-token=token…
Ahmed Lotfy
  • 1,065
  • 2
  • 15
  • 33
2
votes
0 answers

Would it be possible to generate aws provider blocks via terragrunt, based on a data "aws_organizations_organization" "all" {} call?

I have no idea if this would work, but I would like to use terragrunt to generate my providers blocks dynamically. Dynamic providers are currently not allowed (https://github.com/hashicorp/terraform/issues/19932). I see this as a possible…
Josh Beauregard
  • 2,498
  • 2
  • 20
  • 37
2
votes
2 answers

Google Cloud platform terraform/terragrunt googleapi: Error 409: Requested entity already exist

I am having a strange issue when trying to push code out to our gcp repo. It fails with the following error "googleapi: Error 409: Requested entity already exists, alreadyExists" and it is referring to a project that already exists() This only…
2
votes
1 answer

How to define global variables for a Terragrunt deployment

How do I define/reference a set of variables to be re-used throughout my Terragrunt deployment? I'm currently specifying the same values (e.g., subscription, resource_group, environment, etc) in a locals{} block at each level of my deployment, but…
Dlayknee
  • 123
  • 8
2
votes
0 answers

How to share state between different environments via terragrunt?

Suppose I have defined two environments - staging and production via terragrunt. Each uses common module definitions and parametrizes them by environment. This all makes sense until I want to configure gitlab and inject things like ECR repo URLs…
jasiek
  • 51
  • 2
1 2
3
18 19