Open
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
I noticed that when migrating files into a subdirectory such as parent/*.tf to parent/subdir/*tf, it will try to plan the empty parent/ dir even though there aren’t any matching *.tf files and fail to plan. Anyone know of a configuration fix for this or is this a bug?
To get around this, I’m thinking of updating the workflow to check if the directory is empty before the init workflow and if it is, just do an early exit 0
This issue makes refactoring more difficult.
Reproduction Steps
- Find a directory of terraform files e.g.
parent/*.tf
- Create a new directory within that directory
parent/subdir
- Move the contents of
parent/*.tf
toparent/subdir
- Create a PR
Atlantis will try to plan both parent/
and parent/subdir
. The latter will succeed and the former will fail because there are no terraform files here.
Logs
Environment details
Additional Context
- Must be a bug in auto discovery. The directory shouldn't even show up if there aren't any terraform files in there. See docs: auto discovering of projects #3038