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

Terraform module structure to handle incremental azure vdi

I am currently using Terraform to create Azure vdi. My current structure is main.tf input.tf module/ main.tf, var.tf So whenever a user joined the particular team, I do the following steps Let say user1 Currently I am creating user1 folder with…
pythonhmmm
  • 833
  • 1
  • 18
  • 38
0
votes
1 answer

GCP Terraform resource policy in compute module issues

I am trying to add a start-stop schedule to our vm instances in our cloud repository (it is a terraform/terragrunt setup) The example presented on the official site is this: So since we use Terragrunt as a wrapper my module looks like this: And…
0
votes
1 answer

Terraform - Objects in wrong order

I want to get host IPs out of two subnets in AWS using Terraform/Terragrunt and the cidrhost function. For some reason, the subnets are being injected into cidrhost in the wrong order. The remote state it's checking looks like…
0
votes
1 answer

Terraform isn't reading security group IDs from remote state

My terraform module does not read a remote state data source if I use interpolation. This works: security_group_ids = [data.terraform_remote_state.sg.outputs.sg_paris_id] And when I run terragrunt apply it lists the SG ID but it makes the module…
0
votes
1 answer

Terraform AWS IAM Role “inline_policy.0.policy” contains an invalid JSON policy using ${file xyz} and jsonencode

Please see below. First, with only the assume role policy, it works. If I remove the inline the policy, it all validates. When left in, (it looks like this.) It does not validate. I am using Terragrunt, but I believe this is a Terraform…
0
votes
1 answer

terragrunt before hook disable termporarily

I would like to run terragrunt just for once without before hooks. Looking at the documentation unable to find anything useful. Also unable to find anything useful in the google search results. Do we have a bash variable or command line options to…
Kharthigeyan
  • 555
  • 4
  • 14
0
votes
1 answer

Adding a Lambda function into Kinesis Firehose via Terraform

I have a firehose delivery stream storing data in S3. However, I want to add a lambda function to the delivery stream to parse data before storage. Do I need an IAM policy in addition to kinesis policies for this purpose?
0
votes
0 answers

Terraform container - /usr/bin/git exited with 128: fatal: unsafe repository ('/path' is owned by someone else) when checking out registry modules

I am trying to checkout registry modules with terraform. I am using a terragrunt container and getting the following error when I use a module that is pulling from github. /usr/bin/git exited with 128: fatal: unsafe │ repository ('/path/module' is…
clonerworks
  • 641
  • 1
  • 6
  • 16
0
votes
1 answer

Variables in terragrunt. AWS region selection

I'm trying to create AWS environment using terragrunt. I worked in us-east-2 region and now I want to work in eu-central-1. In my code I have the only variable, that represents region. I changed it to eu-central-1, but when I execute "terragrunt…
bohdan
  • 21
  • 5
0
votes
1 answer

grant privileges and permissions to a role via terrafrom is not working

according to terraform doc, I created a user and role as follows: resource "postgresql_role" "ro_role" { name = "ro_role" } resource "postgresql_role" "ro_user" { name = "ro_user" login = true password = "some sensitive…
DragonKnight
  • 1,740
  • 2
  • 22
  • 35
0
votes
0 answers

How to include file from terraform source module in terragrunt?

I have two repos, one contains terragrunt configuration and the other contains terraform code. I would like to include a file in terragrunt configuration that is present in terraform code. I guess this is not possible since terragrunt is first…
0
votes
1 answer

Terraform / Terragrunt use variables for provider_version

I am looking to pass in the provider_version into terragrunt.hcl as a variable to make upgrading / setting the version easier. However this is my current code: terraform { backend "s3" {} required_version = "~> 0.12" required_providers { …
user7692855
  • 1,582
  • 5
  • 19
  • 39
0
votes
0 answers

file not found,jenkins pipline

I am getting file not found error on my Jenkins job. if (component_meta ==null) echo "path = " + component_meta else if (component_meta.tf_version !=null){ echo "path = " + component_meta echo "version = " +…
0
votes
1 answer

How do I refer to a specific branch of a private git repo in Terragrunt?

I want to refer to a feature/IaC (any specific branch other than the main) branch of a multibranch private git repo as a source parameter of Terragrunt's configuration file. Here is a piece of code from my terragrunt.hcl file terraform { source =…
0
votes
1 answer

Terragrunt provider.tf generation not generating files

The expectation is that when running a terragrunt run-all apply from the root directory, a provider.tf file will be created in the sub directories. I've verified my backend is able to talk to my azure storage account and it will create a…
dcvl
  • 485
  • 1
  • 7
  • 21