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

iam_role arn pulled from dependency broken #1870

Open
awiesner4 opened this issue Oct 14, 2021 · 2 comments
Open

iam_role arn pulled from dependency broken #1870

awiesner4 opened this issue Oct 14, 2021 · 2 comments
Labels
bug Something isn't working p:queued

Comments

@awiesner4
Copy link

It looks like there was a conscious decision to change the parsing for iam_role here: #1807

However, this has lead to breaking existing terragrunt functionality where we would create global IAM roles for a particular environment/account, and then use dependencies to pull in the arns like so:

dependency "iam" {
  config_path = "../../../../../../global/iam"
}

iam_role = dependency.iam.outputs.eks_admin_role_arn

When running with v0.31.5, this works without issue. It now no longer works and I get the following error when running with newer versions:

ERRO[0000] /Users/awiesner/git-v2/ego-infra/aws/prod/us-east-2/tp/az-a/vpc1/tp0/eks/terragrunt.hcl:57,12-22: Unknown variable; There is no variable named "dependency"., and 1 other diagnostic(s) 
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1 
@yorinasub17 yorinasub17 added needs-design bug Something isn't working and removed needs-design labels Oct 14, 2021
@yorinasub17
Copy link
Contributor

This is unfortunately a side effect of fixing another bug with iam_role. I'm a bit buried with other initiatives right now, but I'll be taking a look to see if there is a way to make this use case work. For now, I recommend using the older version that works for you, or looking to alternative means of getting that IAM role ARN.

FWIW, I think this is another evidence point for #1840

@awiesner4
Copy link
Author

Thank you, @yorinasub17 . Understood completely. We're going to stay with our older version for now, and will also explore other ways of dynamically building the iam_role arn.

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

No branches or pull requests

3 participants