Terraform pull request automation on GitHub using GitHub Actions.
- interaction is through pull request comments
- Atlantis comments on the PR with command prompts of what to type in comments
(and even corrects you if you comment
terraform
instead ofatlantis
command) - runs the Terraform / Terragrunt plan automatically upon creation / commit changes to the PR including GitHub update from trunk
- prints the plan output in PR comment
- comment
atlantis apply
to respond for Atlantis to apply the changes - requires PR to be mergeable before it will honor
atlantis apply
comments- so your other PR checks must pass first
- Terragrunt becomes more useful in this context to modularize code base to reduce blast radius of changes and have Atlantis do shorter plan and apply runs
atlantis plan # -d path/to/terragrunt/module/directory
atlantis apply
If you merge a pull request, Atlantis will refuse to operate apply it.
You will then need to revert the PR and raise it again.