Atlantis "no projects were matched" in CI
Atlantis maps changed files to projects using when_modified (or auto-detection). If nothing in the PR matches a project, autoplan reports "no projects were matched" and runs nothing, which can look like a silent no-op.
What this error means
Atlantis comments "Ran Plan for 0 projects" or "No projects were matched" after a push, even though you expected a plan. A targeted atlantis plan -p name may say the project name was not found.
Ran Plan for 0 projects:
No projects were matched. This can happen if the modified files do not match
any project's `when_modified` patterns.Common causes
Changed files do not match any when_modified pattern
The PR touched files outside every project's when_modified globs, so autoplan matches nothing.
A project name or dir is wrong
A atlantis plan -p <name> or -d <dir> references a project that is not defined in atlantis.yaml.
How to fix it
Fix the when_modified globs
- Confirm the changed paths against each project's
when_modifiedlist. - Add or widen a glob so the modified files map to the intended project.
- Push again to trigger autoplan.
projects:
- name: prod
dir: prod
autoplan:
when_modified: ["*.tf", "../modules/**/*.tf"]Plan the project explicitly
Use a project name that exists in atlantis.yaml (or a valid dir) when running a targeted plan.
atlantis plan -d prodHow to prevent it
- Keep
when_modifiedglobs covering shared module paths, not just the project dir. - Name projects consistently and reference the exact name.
- Verify autoplan matched the expected projects after each config change.