Open utterances-bot opened 2 weeks ago
Hi Ervin, trying to command terragrunt run-all apply, but i am facing this issue: terragrunt.hcl:2,41-64: Error in function call; Call to function "find_in_parent_folders" failed: ParentFileNotFoundError: Could not find a global.hcl in any of the parent folders of... Any idea?
This is strange Terragrunt behavior, it cannot find global.hcl
file in the root folder.
According to the documentation for find_in_parent_folders
it says that is should be able to find configuration files in the same directory or in a parent directory of the current terragrunt.hcl
file. Since both are present in the root folder, as per my understanding, it should be able to resolve them both. I assume this is a Terragrunt bug.
I suggest that you start deploying your code for one AWS account only, hence for one environment at the time. You could cd
into one of these directories: dev
, qa
, prod
and try to run execute run-all apply
from there.
It seems a terragrunt bug I am in dev
and executed run-all
:
WARN[0000] Error reading file ...tg-multi-account/dev/us-east-1/alb/../../_env/alb.hcl: open ...tg-multi-account/dev/us-east-1/alb/../../_env/alb.hcl: no such file or directory
ERRO[0000] Error processing module at '...tg-multi-account/dev/us-east-1/alb/terragrunt.hcl'. How this module was found: Terragrunt config file found in a subdirectory of ...tg-multi-account/dev/us-east-1. Underlying error: open ...tg-multi-account/dev/us-east-1/alb/../../_env/alb.hcl: no such file or directory
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
terragrunt version 0.59.5
Please try to do a git pull
to get the latest changes from the repository.
Thank you!
Should it work(in Bold)?
generate "provider" { path = "provider.tf" if_exists = "overwrite_terragrunt" contents = <<EOF provider "aws" { region = "${local.aws_region}" profile = "${local.environment}"
default_tags { tags = ${jsonencode(local.default_tags)} }
allowed_account_ids = ["${local.account_id}"] } EOF }
profile = "${local.environment}"
Ervin Szilágyi - Personal Site
https://ervinszilagyi.dev/articles/terragrunt-for-multi-region-multi-account-deployments.html