atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

[Feature request] Avoid missing Terraform applies by adding Atlantis user as MR approver

Open blastik opened this issue 5 months ago • 0 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

We are using Atlantis in Gitlab. We have several workspaces, typically linked to an AWS account (environment) and a region and each of them with its own workflow. Some of the workflows have dependencies on another workflow (that way we enforce things like dev being applied first and then production). We also enabled automerge. Now, currently there is a chance for engineers missing out pending terraform applies (lets say, they apply dev and sandbox but not production). They could merge any time and that would make that workspace out of sync with what has been committed to the main branch. Obviously we've set approved apply requirement for some workspaces but that doesnt solve the issue.

Describe the solution you'd like

What if Atlantis, as part of the automerge process, also adds himself as approver once users finish doing all terraform applies. That way we could add a Gitlab rules so MRs cannot be merged without Atlantis user approval. So the process would be: User finishes the last terraform apply > then Atlantis add himself as approver > now both Atlantis and the user could merge the MR (because of the Gitlab MR and CODEOWNERS rules)

Describe the drawbacks of your solution

N/A

Describe alternatives you've considered

Is there any? 🤔

blastik avatar Jan 29 '24 10:01 blastik