mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-31 19:18:42 +00:00
This clarifies that the `when_modified` block will be used by both manual and automatic planning even though it's configured without the auto planning block. This will help clarif issues like #774.
1.8 KiB
1.8 KiB
Autoplanning
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:
- Get list of all modified files in pull request
- Filter to those containing
.tf - Get the directories that those files are in
- If the directory path doesn't contain
modules/then try to runplanin that directory - If it does contain
modules/look at the directory one level abovemodules/. If it contains amain.tfrun plan in that directory, otherwise ignore the change.
Example
Given the directory structure:
.
├── modules
│ └── module1
│ └── main.tf
└── project1
├── main.tf
└── modules
└── module1
└── main.tf
- If
project1/main.tfwere modified, we would runplaninproject1 - If
modules/module1/main.tfwere modified, we would not automatically runplanbecause we couldn't determine the location of the terraform project- You could use an atlantis.yaml file to specify which projects to plan when this module changed
- Or you could manually plan with
atlantis plan -d <dir>
- If
project1/modules/module1/main.tfwere modified, we would look one level aboveproject1/modulesintoproject1/, see that there was amain.tffile and so run plan inproject1/
Customizing
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