-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Exclude directory without defining all directories in atlantis.yaml #859
Comments
Hi Justin, this is not possible right now. Every directory needs to be defined. |
Currently the only way to do it would be to programmatically generate atlantis.yaml in a pre-workflow-run. See projects like
You can also use a custom shell script to do this since the Going forward, it would be handy to maybe have an # proposal
autodiscover:
enabled: true
ignore:
- "^_modules/.*"
# proposal: for all autodiscovered projects
project_defaults:
- workspace: default
workflow: default
autoplan:
when_modified: ["*.tf", "../modules/**/*.tf"]
enabled: true
# override autodiscovered projects matching the same
# combination of `dir`, `workspace`, `workflow`
projects:
- dir: terraform/nlb
workspace: default
workflow: default
name: terraform/nlb
autoplan:
enabled: false This way we can set the defaults for ALL projects discovered and then override specific projects to ignore autoplanning. In slack, @krrrr38 suggested an additional key called autodiscover:
ignore_paths:
- "^_modules$" it would be good to study env0, spacelift, and terrateam to see what their interface is and how they solve this problem |
I found an old github entry, that made this seem possible, but it appears its changed.
Is there a way to exclude a directory, that doesn't require listing every directory in atlantis.yml?
We are wanting non-engineers to be able to easily create their new environments via a pull request. So we will not know ahead of time, what 'projects' would exist at any given time.
Folder structure is like the below. _modules folder, example folder inside which is a almost 99% complete deployment, user just needs to create a folder at the root level, copy those files in and change the backed settings. I never need to plan or run on this folder.
Even the option to exclude this directory, but include all other directories based on some sort of regex would be great. like ignore _module, but include any project starting with
deploy_
etc.The text was updated successfully, but these errors were encountered: