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

Add ability to define extra deps for local modules #317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erpel
Copy link

@erpel erpel commented Feb 29, 2024

Pull Request

Related Github Issues

Description

I'm looking to add the ability to also trigger a run based on non-terragrunt files in local modules referenced via source in the terraform block in terragrunt.hcl.
Especially the filename is up for discussion. It seems obvious to name it terragrunt.hcl, but I'm not sure if I got an overview of all possible implications of adding such a file local modules that should not be applied directly.

Looking for feedback, it seems to be working for us in a small experimental run.

Security Implications

  • [none]

System Availability

  • [none]

@Almenon
Copy link
Collaborator

Almenon commented Mar 3, 2024

I'm not really clear on the difference in behavior between this and the existing extra_atlantis_dependencies. You can do this already with the existing functionality. In extra_atlantis_dependencies you can specify a path to a file in your modules directory.

@Almenon
Copy link
Collaborator

Almenon commented Mar 3, 2024

Also ignore the CI test error, sorry, #311 will fix it. This PR will need to be rebased once that is merged in.

@erpel
Copy link
Author

erpel commented Mar 5, 2024

Thanks for taking the time to look at this.

I'm not really clear on the difference in behavior between this and the existing extra_atlantis_dependencies. You can do this already with the existing functionality. In extra_atlantis_dependencies you can specify a path to a file in your modules directory.

This is basically meant as a convenience thing. Right now, if the module is used in 7 locations in my repo, I'd need to duplicate the extra_atlantis_dependencies statement in every terragrunt.hcl that references that module.
This change would increase separation of concerns, making it possible to use such a local module without having to know about or care for the inner workings of these modules and their "special files".

I've been testing it locally with the env vars patch from #311 applied, was unsure if I should duplicate it in here to show tests are green. Thanks for clarifying the preferred strategy. Will take care of a rebase if interest in this feature is expressed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants