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

New include doesn't evaluate in locals block #1721

Closed
stevie- opened this issue Jun 17, 2021 · 1 comment · Fixed by #1723
Closed

New include doesn't evaluate in locals block #1721

stevie- opened this issue Jun 17, 2021 · 1 comment · Fixed by #1723
Labels
bug Something isn't working

Comments

@stevie-
Copy link
Contributor

stevie- commented Jun 17, 2021

Terraform version 0.14.11
Terragrunt version 0.30.4

First, thank you for this cool feature to access the include's atttributes!

But we have issues to use it in the child's locals block.

here is a dummy test code

test/terragrunt.hcl

locals {
 environment = "test"
}

test/child/terragrunt.hcl

include {
  path   = find_in_parent_folders()
  expose = true
}

locals {
  test = include.locals.environment
}
cd test/child
❯ terragrunt validate --terragrunt-log-level trace
DEBU[0000] Found locals block: evaluating the expressions.
DEBU[0000] Found locals block: evaluating the expressions.
DEBU[0000] Evaluated 1 locals (remaining 0): environment
DEBU[0000] Evaluated 0 locals (remaining 1):
ERRO[0000] Not all locals could be evaluated:
ERRO[0000] 	- test
ERRO[0000] Could not evaluate all locals in block.
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

It works if we use it in the inputs block directly.

@yorinasub17 yorinasub17 added the bug Something isn't working label Jun 17, 2021
@yorinasub17
Copy link
Contributor

This is now fixed in https://github.com/gruntwork-io/terragrunt/releases/tag/v0.30.5 (binaries will show up shortly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants