How To
Include / exclude patterns
You can specify wildcard and glob patterns in digger.yml to include multiple directories into a project. A common use case for this is if you have multiple environment folders and they import from a common modules
directory:
development/
main.tf
production/
main.tf
modules/
shared_moduleA/
dev_only_module/
The path of include / exclude patterns is relative to the digger.yml location - NOT the project location
If you wanted to trigger plans for all modules/
folder in both dev and prod projects you would include them in the include_patterns
key. Similarly you put anything which you want to ignore in the exclude_patterns
key ( exclude takes precedence over includes).
projects:
- name: dev
dir: ./development
include_patterns: ["./modules/**"]
workflow: default_workflow
- name: prod
dir: ./production
include_patterns: ["./modules/**"]
exclude_patterns: ["./modules/dev_only_module/**"]