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

How to pass variables between Terragrunt workspaces

I'm new to terragrunt and trying to figure how to pass variables between modules. I'm following terragrunt documentation here yet no luck and fails with error: apps tg run-all plan INFO[0000] The stack at /Users/xxx/sri/aws/Infrastructure/apps…
Sri
  • 51
  • 4
0
votes
0 answers

Migrate terraform to terragrunt for high number of modules

I have microservice non-prod env. where each team has its own env. which means a lot of envs, in terms of terrafrom right now I have two github repos: The first one has root tf modules. The Second one has reusable tf modules. The first one…
Aladdin
  • 1,207
  • 2
  • 16
  • 26
0
votes
1 answer

YAML Azure Pipelines - Loops with Conditional Jobs

I have the following YAML pipeline that I cannot seem to get working based on the conditional values. parameters: - name: "workloads" type: object default: wkld001: update wkld002: "delete" wkld003: "update" …
0
votes
1 answer

Terraform / terragrunt and minikube: What is my host IP?

I have installed an started minikube like within the offical docs. My minikube is running fine and "minikube dashboard" shows me all running things. Now I want to deploy my terraform code to it. I start with a test namespace to see if it is…
PassionateDeveloper
  • 14,558
  • 34
  • 107
  • 176
0
votes
1 answer

passing specific expression in terraform

I need to pass expression as tags.severity == "warning" but getting error as │ Error: Missing newline after argument i tried with this method but it is not working rules { is_basic = false expression = "tags[\"severity\"] == warning" …
Dhaval Shah
  • 144
  • 1
  • 8
0
votes
1 answer

Create Terraform resource if variable is not null

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object_lock_configuration So basically I want to make a resource creation optional only if the variable object_lock_enabled is declared. It's an optional variable…
0
votes
2 answers

Terraform output error: Error: Variables not allowed

I am really not sure why I am seeing this error. I know it's something simple and right in my face . My issue is how I am passing on the subnet_id in the subnet_mapping block. This is the code below: main.tf resource "aws_lb" "lb" { name …
Karl Diji
  • 103
  • 1
  • 6
0
votes
0 answers

Iterate over multiple state file to get a list of strings in terraform

I am new bee and have an issue while retrieving the value from state file. At present what I want is to retrieve the value of vpc_id from multiple state file and create a list of strings out of it so that it can be passed to a…
user3616775
  • 75
  • 1
  • 10
0
votes
1 answer

Why is Terragrunt asking for input variables that shouldn't exist in the version of the module I'm calling in the "terraform" block?

I have two Terragrunt repositories in GitLab: infrastructure-modules infrastructure-live In the infrastructure-modules repository I have an ec2 module with several versions that are indicated with git tags (eg. "v.0.0.12", "v.0.0.13", "v0.1.0"…
A. Kendall
  • 391
  • 3
  • 12
0
votes
1 answer

optional locals within terragrunt configs?

If we take the following structure as an example, is there a way to make locals within the .hcl files optional? . ├── terragrunt.hcl └── global_vars.hcl/ └── lz_vars.hcl/ └── workload_vars.hcl/ └── terragrunt.hcl I've tried…
0
votes
0 answers

Merged tags failing using terragrunt and terraform

I have the following file structure: . ├── terragrunt.hcl └── root.hcl / └── env.hcl / └── workload.hcl/ └── terragrunt.hcl within each config (hcl file), there are tags such as: root locals { tags = { root=…
0
votes
0 answers

Terragrunt environment unable to pass inputs to terraform module variable

Terragrunt is returning an error where there is no value provided for the required variable in one of the root modules. This is how my structure looks like live/ ├─ dev/ | |- terragrunt.hcl │ ├─ app/ │ │ ├─ terragrunt.hcl modules/ ├─ app/ │ ├─…
0
votes
1 answer

Terraform - loop over template

I'm new to terraform and I try to achieve something that could remove the redundoncy of my infrastructure. Basically I have one module that calls child modules like so : module "jobs" { source = "./jobs" environment =…
0
votes
1 answer

How to access variables in terragrunt.hcl file

I am trying to access variables from variables.tf file inside terragrunt.hcl file. Project structure: | Terraform | shared-folder - variables.tf -vars.tf -terragrunt.hcl This is the code snippet from .hcl file locals{ …
0
votes
0 answers

How to grant execute-api:ManageConnections permission automatically for multiple API WebSocket Gateways with Terraform

My infrastructure consists of a lambda function and an API Gateway WebSocket. I'd like to have a multi-regional setup, where the lambda function in each region can post messages to API Gateway websocket connections in each region. So for example the…