-
Notifications
You must be signed in to change notification settings - Fork 93
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
Inherit extra_atlantis_dependencies from included parent terragrunt files #59
Comments
Thanks for opening this! Just so I can understand bet, where are you adding the As a note, terragrunt |
defining the extra_... in the parent terragrunt. This is not something we want to have to add for 100s of leaf terragrunt.hcl files. |
Sure, I can take this as a feature request to pass down the Then as far as you question about generating projects for the parent |
Great please let me know if you need assistance with testing. Also I have noticed it doesn't seem to capture files referenced by extra arguments and varfiles. Unless .tf captures files from other directories, but I don't believe this is the case. |
That is also a great point! I haven't used extra_argument files, so I missed that feature, but that should be quite easy to add. I'll see if I can get to a few of these open issues today or this weekend 😄 |
Linking issue: #60 |
Release v0.9.1 is out now, which enables merging in I started using this feature in my company's monorepo already, and it seems to work / be a useful improvement, so thank you for the suggestion! Please let me know if you have any issues using the new features. As an example, here is what I have in one of my top level parent modules: locals {
extra_atlantis_dependencies = [
abspath("common.tf"),
abspath("terragrunt-config-prod.hcl")
]
} |
Was that really released? Asking because hitting same issue with the latest (v1.12.3) version. |
Ya caught me in an embarrassing moment, release v0.9.1 was just because I forgot to bump the version properly in v0.9.0. So the actual changelog to check is from v0.8.0 to v0.9.1: v0.8.0...v0.9.1 which includes this PR: #61. It's certainly possible that there's still a bug here @awasilyev, so feel free to open a new issue if you'd like. The currently tested feature is that if both a parent and a child have The test here: https://github.com/transcend-io/terragrunt-atlantis-config/blob/master/cmd/generate_test.go#L237-L242 is an assertion that this output file: https://github.com/transcend-io/terragrunt-atlantis-config/blob/master/cmd/golden/mergeParentDependencies.yaml is generated from this project directory: https://github.com/transcend-io/terragrunt-atlantis-config/tree/master/test_examples/parent_with_extra_deps If you notice an edge case in your project that's different from that test, or believe that the test may be wonky and does not cover what you need, I would love to work on that in a new issue 😄 |
I just stumbled across this tool and think it would extremely useful for us, however it seems to not fully understand out repo structure and our use of the include block in leaf terragrunt.hcl files.
Setup:
-- /modules
-- /providers/<env>/terragrunt.hcl
-- /providers/<env>/project/region/resource/terragrunt.hcl
-- /providers/common_vars/common_tags.yaml
All leaf terragrunt.hcls include their "parent" terragrunt.hcl.
The parent terragrunt.hcl has locals that are used for the purpose of tagging resources:
Then all modules simply reference var.tags for any of their tag fields. This allows us to easily create and overwrite default tags at every level.
I tried adding the extra_atlantis_dependencies with the find(filesabove), but those files never showed up in any of the leaf autoplan dependencies. Instead the generator created a providers/env project which serves no purpose.
Any advise? Is there an option I'm missing for it to properly understand this?
Thanks!
The text was updated successfully, but these errors were encountered: