Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: multiple atlantis_skip at same child level causes config failure #361

Open
jeremyciak opened this issue Dec 9, 2024 · 0 comments
Open

Comments

@jeremyciak
Copy link

Bug report

We have the following structure:

environments/
|-- aws_account_1/
|   |-- aws_region_1/
|   |   |-- environment_1/
|   |   |   |-- service_1/
|   |   |       |-- terragrunt.hcl
|   |   |-- environment_2/
|   |   |   |-- service_1/
|   |   |       |-- terragrunt.hcl
|   |-- aws_region_2/
|       |-- environment_1/
|           |-- service_1/
|               |-- terragrunt.hcl
|-- aws_account_2/
|   |-- aws_region_1/
|       |-- environment_1/
|           |-- service_1/
|               |-- terragrunt.hcl
|-- terragrunt.hcl

We are trying to set a local of atlantis_skip set to true in the top-level terragrunt.hcl file so that we can do fine-grained opt-in against specific environment/service for Atlantis plans. This works as intended when I add the following to environments/aws_account_1/aws_region_1/environment_1/service_1/terragrunt.hcl:

locals {
  atlantis_skip = false
}

To Reproduce

Add the same block to environments/aws_account_1/aws_region_1/environment_2/service_1/terragrunt.hcl.

Expected behavior

No errors. I expected the Atlantis config to generate successfully.

Actual behavior

I start getting errors from Atlantis during the execution of terragrunt-atlantis-config:

ERRO[0002] Could not convert include to the execution context to evaluate additional locals in file /git/environments/aws_account_1/aws_region_1/environment_1/service_1/terragrunt.hcl 
ERRO[0002] Encountered error while evaluating locals in file /git/environments/aws_account_1/aws_region_1/environment_1/service_1/terragrunt.hcl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant