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

Support changes in modules/ directories #211

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Support changes in modules/ directories #211

merged 1 commit into from
Dec 4, 2017

Conversation

lkysow
Copy link
Collaborator

@lkysow lkysow commented Dec 1, 2017

Fixes #188.

With this change, we'll detect changes in any directories under modules/. We'll then try to run plan one directory up from the modules/ dir.

Examples:

  • change to modules/main.tf will run plan in .
  • change to project/modules/main.tf will run plan in project/
  • change to modules/dir/main.tf will run plan in .

The only issue with this would be if a modules dir was being used between multiple projects, ex.

project1/
- main.tf # this references ../modules
project2/
- main.tf
modules/
- module.tf

@lkysow
Copy link
Collaborator Author

lkysow commented Dec 1, 2017

@ntietz would this work for your use-case?

@@ -20,7 +20,7 @@ type ProjectFinder interface {
// DefaultProjectFinder implements ProjectFinder.
type DefaultProjectFinder struct{}

var excludeList = []string{"terraform.tfstate", "terraform.tfstate.backup", "_modules", "modules"}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need _modules because it's not a common directory for modules. Googling for it shows only Hootsuite uses.

@ntietz
Copy link

ntietz commented Dec 4, 2017

@lkysow Yes, I think this will work for our use-case, assuming that it captures changes in, say, modules/dir/otherfile.tf, not just ..../main.tf. (I assume it does, based on the diff, but I am unfamiliar with both go and this codebase.)

@lkysow
Copy link
Collaborator Author

lkysow commented Dec 4, 2017

Okay awesome! I'll push a new release.

@lkysow lkysow merged commit f686019 into master Dec 4, 2017
@lkysow lkysow deleted the modules branch December 4, 2017 04:41
@lkysow
Copy link
Collaborator Author

lkysow commented Dec 4, 2017

Available in the latest release: https://github.com/hootsuite/atlantis/releases/tag/v0.2.1

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.

2 participants