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

How to read a non .hcl file in terragrunt to a variable

Such a simple thing, yet it seems impossible to do or search for... I just need to simply read file contents into a variable and create a list to for loop through. file A [ "0.0.0.0/0", "8.8.8.8/32" ] file B [ "10.0.0.0/8", …
Nick Hatfield
  • 315
  • 2
  • 11
0
votes
0 answers

Terraform for azure autoupgrade: string required

I am trying to add terraform for azure automatic upgrade channel. when I try with automatic_channel_upgrade = "patch" with string It is working fine. But when i want to use multiple attributes like automatic_channel_upgrade = ["patch","node-image"]…
Karikaaalan
  • 149
  • 1
  • 8
0
votes
0 answers

Terraform - add parameters to a resource using terragrunt

Using "kubectl_manifest", I am trying to add sections to a Yaml file only if a parameter exists in Terragrunt. For example, here Im creating a yaml file and ONLY if "label" parameter exists, label's value will be added to the manifest. resource…
jrz
  • 1,213
  • 4
  • 20
  • 54
0
votes
2 answers

Terragrunt - dynamically add TF and TG versions to AWS default tags

I have a default tags block and would like to add new tags showing the TG and TF versions used in deployment. I assumed this would work, but I was wrong.. locals { terraform_version = "${run_cmd("terraform --version")}" terragrunt_version …
Dave
  • 29
  • 4
0
votes
0 answers

how to skip a module if the module it depends on has no outputs?

I have a module depending on another, example terragrunt.hcl in the depending module: dependency "workspace" { config_path = "../workspace" } inputs = { databricks_resource_id = dependency.workspace.outputs.resource_id } During apply there…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
1 answer

How to update resource from another Terraform configuration

I'm trying to build hub-spoke topology in Azure. Hub VNET - includes Azure firewall with default rules, has it's own TF state file Spoke VNET - includes other Azure resources (Blobs, Key vaults etc.), there are many Spoke VNETs (each per…
Bohumil
  • 1
  • 1
0
votes
0 answers

Call to function "run_cmd" failed: fork/exec ./test.sh: permission denied

Am getting error in shell script configured in terragrunt.hcl file through run_cmd ssm_runner = run_cmd("--terragrunt-quiet", "./test.sh", "${local.aws_profile}") when i tried to generate plan an getting error. pipeline job running in…
0
votes
1 answer

Access all resource created by for_each in other for loop Terraform

I want to create multiple acm certificates and route53 records for its validation, just cant figure out how can I reference to all acm resources created by for_each in route53 resource block which is looping in acm resource to get all the DNS…
0
votes
0 answers

Atlantis with Terragrunt

I use terragrunt to keep my code DRY, I have two repo structures one for modules and the other where my terragrunt files reside and inside the terragrunt.hcl I refer the source module via git . Just checking out if anyone has successfully…
0
votes
0 answers

Why is terraform ignoring my terragrunt inputs?

Recently I took over a terraform & terragrunt project a previous person worked on, and unfortunately I can not get it to work properly, meaning that the terragrunt inputs are totally ignored by terraform. TERRAFORM_VERSION: 1.2.8 TERRAGRUNT_VERSION:…
0
votes
3 answers

Terraform - Increment a Variable in a for_each Loop

I am trying to figure out a way to add an incrementing number to resource. Here is a snippet of my code. I would like to make the priority an incrementing number, instead of passing in a fixed number. Current Code resource…
0
votes
0 answers

Terragrunt with Hashicorp Vault does not initialise & apply the vault dependency from root folder,need to exclusively initialise Vault from sub folder

I am new to terraform and terragrunt. I am using Vault to store Azure Service Principal and provisioning infra using terragrunt. I am unable to initialize and apply the vault dependency from root folder, need to exclusively initialize Vault from its…
0
votes
1 answer

How to add a label to my vm instance in gcp via terraform/terragrunt

I have an issue in our environment where i cannot add a label to a vm instance in GCP via terraform/terragrunt after creation. We have a google repository that is setup via terraform and we use git to clone and update from a local repository, this…
0
votes
1 answer

Terragrunt source from specific git branch as a vairable

I know that it is possible in terragrunt to add a git source reference to a specific branch as mentioned in another post. But is it possible to set the branch based on something like a global variable? So instead of terraform { source =…
finnk
  • 123
  • 1
  • 1
  • 12
0
votes
0 answers

delivery_policy attribute is not included when importing aws_sns_topic

I'm trying to import the current configuration on AWS SNS topic to the remote state. But it seems that delivery_policy is not included (Delivery retry policy (HTTP/S) has been configured). So, terraform plan show adding this attribute. terraform…