runatlantis.io/docs/autoplanning.md
On any new pull request or new commit to an existing pull request, Atlantis will attempt to
run terraform plan in the directories it thinks hold modified Terraform projects.
The algorithm it uses is as follows:
.tfmodules/ then try to run plan in that directorymodules/ look at the directory one level above modules/. If it
contains a main.tf run plan in that directory, otherwise ignore the change (see below for exceptions).Given the directory structure:
.
├── modules
│ └── module1
│ └── main.tf
└── project1
├── main.tf
└── modules
└── module1
└── main.tf
project1/main.tf were modified, we would run plan in project1modules/module1/main.tf were modified, we would not automatically run plan because we couldn't determine the location of the terraform project
atlantis plan -d <dir>project1/modules/module1/main.tf were modified, we would look one level above project1/modules
into project1/, see that there was a main.tf file and so run plan in project1/Bitbucket does not have a webhook that triggers only upon a new PR or commit. To fix this we cache the last commit to see if it has changed. If the cache is emptied, Atlantis will think your commit is new and you may see extra plans. This scenario can happen if:
If you would like to customize how Atlantis determines which directory to run in
or disable it all together you need to create an atlantis.yaml file.
See