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'm aware this use-case is not very standard, but our infra codebase is separated into two repos (simplified):
infra-tf: terraform code
infra-cfg: configuration
applying terraform requires both repositories, and we are using Atlantis to deploy changes in each of the repos.
We use pre_workflow_hook to checkout the other repo before plan/apply and to generate the atlantis.yaml
this setup works well for infra-tf, but for infra-cfg - atlantis apply (all) command doesnt apply anything cause it cant find the plan files. We are able to run atlantis apply -p project_name.
looking into the atlantis code i found out that when running atlantis apply it tries to locate plans using
git ls-files . --others
but this command will not list untracked files generated inside nested git repositories (as infra-tf repo is nested below infra-cfg (https://stackoverflow.com/a/51851111)
I assume if someone is using git submodules, they will get the same behavior.
Reproduction Steps
run git init in a terraform directory as pre_workflow_hook or custom workflow
I'm happy to try submit a PR but need your input whats be best way to support this use-case and why this implementation was chosen and not listing all files recursively.
Community Note
Overview of the Issue
I'm aware this use-case is not very standard, but our infra codebase is separated into two repos (simplified):
infra-tf
: terraform codeinfra-cfg
: configuration applying terraform requires both repositories, and we are using Atlantis to deploy changes in each of the repos.We use
pre_workflow_hook
to checkout the other repo before plan/apply and to generate the atlantis.yamlthis setup works well for
infra-tf
, but forinfra-cfg
-atlantis apply
(all) command doesnt apply anything cause it cant find the plan files. We are able to runatlantis apply -p project_name
.looking into the atlantis code i found out that when running
atlantis apply
it tries to locate plans usingbut this command will not list untracked files generated inside nested git repositories (as
infra-tf
repo is nested belowinfra-cfg
(https://stackoverflow.com/a/51851111) I assume if someone is using git submodules, they will get the same behavior.Reproduction Steps
run
git init
in a terraform directory aspre_workflow_hook
or custom workflowLogs
Environment details
Atlantis server-side config file:
I'm happy to try submit a PR but need your input whats be best way to support this use-case and why this implementation was chosen and not listing all files recursively.