Via @lorenzoaiello, Atlantis should be able to run terraform plan on demand or on a schedule in order to identify whether the actual resources have drifted from what's defined in Terraform.
I'm also interested in this feature. Which is essential to reach a GitOps[1] like model for terraform.
I want to contribute this feature if possible.
The current design I have in mind is:
Run atlantis plan in master branch on all defined workspaces in atlantis.yml (or root dir) on a schedule. If there's diff output for more than N consecutive atlantis plan, create a GitHub issue to alert the user.
drift-golden-branch in atlantis.yml which represent the branch terraform plan will run against. Defaults to master.drift-detection-interval in atlantis.yml, defaults to 1 day.drift-warning-threshold in atlantis.yml, defaults to 3 times.drift-detection in atlantis.yml, defaults to false.The one thing I'm not sure is that if this should be turned on by default. or should we provide a switch for the feature when starting Atlantis.
Some thoughts:
@majormoses I think configuring an outgoing webhook would allow most use-cases for the notification.
I think this is out of the scope of Atlantis unfortunately. Atlantis is best focused on Terraform pull request workflows. It would be a lot of work to build this which would take time away from that focus and make other features around pull request workflows more complicated.
Most helpful comment
I think this is out of the scope of Atlantis unfortunately. Atlantis is best focused on Terraform pull request workflows. It would be a lot of work to build this which would take time away from that focus and make other features around pull request workflows more complicated.