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
37
votes
5 answers

Terraform will damage your computer on macOS Intel

I have problem with terraform on my macOS Ventura 13.3.1. When I try to initialize terragrunt: terragrunt init I have information that Terraform will damage your computer My colleague is using M1 and terraform version 1.0.11 and he don't have…
falauthy
  • 521
  • 1
  • 5
  • 15
32
votes
2 answers

Get current working directory in terraform

I am running Terraform using Terragrunt so I am not actually certain about the path that the terraform is invoked from. So I am trying to get the current working directory as follows: resource null_resource "pwd" { triggers { always_run =…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
16
votes
3 answers

Can I use Terragrunt on Terraform Cloud

I have a provisioning pipeline that incorporates Terraform Cloud, and our leadership is asking us to use Terragrunt to improve Terraform code quality. Terragrunt is a great tool for this, but I haven't see any evidence that anyone has successfully…
codeblue0000ff
  • 225
  • 3
  • 9
12
votes
3 answers

Google Cloud credentials with Terraform

This is a bit of a newbie question, but I've just gotten started with GCP provisioning using Terraform / Terragrunt, and I find the workflow with obtaining GCP credentials quite confusing. I've come from using AWS exclusively, where obtaining…
8
votes
4 answers

Best way to generate a list of non-Terraform created resources

For a couple of days I am working on a way to generate a list of non-terraform created resources. Currently I am using the tagging method but this means that AWS resources that can't be tagged should also be excluded from the AWS Config query. The…
Tom
  • 403
  • 3
  • 14
7
votes
2 answers

is it possible to call multiple terraform modules using terragrunt

I'm trying to call multiple modules from terragrunt. I understand that currently, terragrunt doesn't support multiple sources and we can only call one module at a time. So, I created a main.tf file to frontend multiple modules. # main.tf module…
Meet101
  • 711
  • 4
  • 18
  • 35
7
votes
2 answers

Import Existing Resources in Terragrunt

I'm looking for a way to manage existing resources in my Terragrunt workflow without recreating them. Basic Terraform has the ability to import the remote state here but I don't see a way to do it in Terragrunt. I know it would be possible to use a…
xaocon
  • 185
  • 1
  • 1
  • 9
6
votes
0 answers

Can I pass output values to after hook in Terragrunt?

is there a nice way to pass Terraform output’s value to the bash script fired by after hook in Terragrunt? I could not find any nice functionality to do so.
Murakami
  • 3,474
  • 7
  • 35
  • 89
6
votes
3 answers

resource instance managed by newer provider version error

hi when i tried to run terraform plan in my azure ADF code, this error is popping out please refer the attached image for more details
6
votes
2 answers

Terragrunt import resource created via for_each loop

I'm creating a GCP buckets with for_each loop, and wanted to import the existing buckets into my terraform state An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: +…
potatopotato
  • 1,024
  • 2
  • 16
  • 38
6
votes
1 answer

Is it possible to to "variableize" the source path for a module in Terraform?

Is it possible to use a variable for the module source in Terraform or Terragrunt. Using Terragrunt I know we can override the module source to a local directory but it does not seem to allow us to use a different repo. The use case is to support a…
Kilmore
  • 91
  • 1
  • 6
6
votes
1 answer

Terraform ignores terraform.tfvars file when using -var or -var-file

After a couple of months not dealing with infrastructure changes, I tried to load up our terragrunt files on a new machine and ran into a couple of errors, that I couldn't find a solution to. Basically it seems, that the terraform.tfvars file (or…
5
votes
2 answers

Terragrunt download module from specific branch

I started recently using terragrunt and have been wondering if it's possible to download module from specific branch not specfic tag ( or in addition to tag ) rather than by default master Download specific tag from master: terraform { source =…
potatopotato
  • 1,024
  • 2
  • 16
  • 38
5
votes
1 answer

Terragrunt Global Variables

So I have a set of like 30 inputs that are shared between all projects. I'm wondering the best way to share them in all the terragrunt.hcl files with out having to copy them a million different places. I currently use yaml files for some overrides.…
Moos3
  • 81
  • 2
  • 5
5
votes
2 answers

Terraform provider for Mongodb Atlas: where is my db?

I have successfully created a project, user and cluster via the Mongodb terraform provider, however I am expecting to see a database already created under my new cluster, which is not to be found. I am not sure what it is missing or incorrect and I…
panza
  • 1,341
  • 7
  • 38
  • 68
1
2 3
18 19