329 questions
1
vote
1
answer
81
views
required_providers.tf file code in terraform module interferes with required_providers of terragrunt.hcl
My mongo db module contains the following section
terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas",
version = "1.8.0"
}
}
}...
0
votes
1
answer
278
views
Why do I need to add the variables of a Terraform module in the variables.tf of my environment folder?
I am using terraform with terragrunt to deploy a VPC on AWS using a multi-account setup (an account for dev and an account for prd). I have a file structure as follows.
.
└── my_processor/
├── vpc/...
3
votes
1
answer
100
views
Terratest assigning map inside a map to a variable
So I am picking up my first Go/Terratest changes and it seems pretty straight forward to capture attributes from the Terraform Plan and assign them to variables.
For example:
# module.adls....
0
votes
0
answers
67
views
How can I make terragrunt S3 remote_state use a profile locally but not in CI?
I'm trying to use the terragrunt remote_state block to configure an S3 backend for my state files. Locally I'd like it to use a named profile from my AWS config, but in CI I want it to use the OIDC ...
0
votes
0
answers
96
views
How to call aws eks terraform submodule from the same terragrunt.hcl file?
I was trying to migrate eks module from version 19 to 20, seems like there is a new submodule got introduced aws_auth in terraform aws eks module. My current terragrunt.hcl file looks like this
...
0
votes
0
answers
66
views
How to create a state file and acquire lock at parent level in Terraform with modular structure?
I have a modular Terraform structure managed with Terragrunt, and I want to maintain the modularity of my configuration. However, I need to create and manage the state file and acquire locks at the ...
0
votes
2
answers
169
views
Terraform: Create tfvars from local values
I have a data structure like the following:
locals {
replication_tasks = {
track_to_s3_live = {
replication_task_id = "track-to-s3"
migration_type = "...
0
votes
2
answers
280
views
Terragrunt provider override
I’m trying to understand the structure and usage of Terragrunt. At the moment, I have created the following structure:
├── _common
│ └── instance_template.hcl
├── prod
│ ├── asia-south1
│ │ ├──...
-1
votes
1
answer
456
views
How to deploy AWS Lambda function via Terragrunt without a source package?
I'm trying to deploy an AWS Lambda function using Terragrunt without attaching a zip package. The goal is to create the function with basic configurations and manage it directly through Terragrunt.
I'...
0
votes
1
answer
229
views
automating terraform import using github actions
I am importing an aws lambda function created manually, now in to terraform. Since we have many env and regions we use terragrunt.
I was able to import the lambda function using module as:
resource &...
0
votes
1
answer
272
views
Terraform help: The parent organizational unit '<OU>' is not enrolled in AWS Control Tower error
I'm trying to import an account that already exists into terraform. I seem to have done so successfully and when I try to create the account it just wants to modify a few attributes in place. However, ...
0
votes
1
answer
144
views
Share values from child to parent
I would like to achieve common tags to be included with a set of other tags. Let's assume this is my working directory tree:
├── README.md
├── _envcommon
│ └── eks-vpc.hcl
├── non-production
│ ├── ...
0
votes
1
answer
244
views
How to delete Containers in Azure Storage account with the creation date
I need to delete Containers in Azure Storage account with the creation date of more than 1 year as we create container for every month.
I have tired using Azure Storage Lifecycle management , but we ...
-1
votes
2
answers
302
views
Terraform code not creating multiple rules in Azure Storage lifecycle
I have tried to create Azure storage lifecycle via IAC terraform. But facing the below error.
Expected to create multiples rules for storage lifecycle , but only one rule is created. If we re-run the ...
0
votes
1
answer
48
views
Terragrunt workflow
Why my root.hcl configuration works if find_in_parent_folders() function suppose to find from bottom to top, but instead it actually looking for files in child folders?
root.hcl:
locals {
...