-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to auto run apply upon approval of PR #266
Comments
Hi Matt, I think this workflow would be great and something that should be added to Atlantis via configuration. To clarify the workflow:
Can you clarify this a bit more, why would someone approve a PR if there were changes required? Also which VCS host are you using? Thanks! |
Hello, currently we are using Github, we are planning a migration to Bitbucket either next quarter or the quarter after that. Your workflow that you have listed above is what we are trying to achieve. However, if there are changes required due to formatting, bad versions selected where we have commented to have them correct the issues, we do not want them to approve it uncorrected, but basically once it has been approved to have Atlantis go forth and do its due diligence. As our ultimate goal is to open up terraform beyond just our team, and allow them to submit jobs and build their process with this. Our goal is to make this process as simple as possible for our teams as once we get closer to having a broader scope on things like this that would be great. |
One of the challenges is that not all reviews are equal, depending on your branch protections you could require say two approvals before applying and the first approval may not be a |
Now that #43 is closed, and we have a From the workflow perspective, I am looking for roughly something like this: https://bit.ly/2WlmEFj |
any update on this one? would love to see this feature. |
This is essential for automation, the latest successful plan should be auto applied if it's merge-able and has enough number of approvals. |
Auto apply is against the Terraform Core Workflow principles, "it's important for the team to review the final concrete plan". In the other hand I fully understand the need and find the auto apply as an advantage but to be success it would require automation/tooling that would check the plan against the code changes and would approve the plan only if the resources are planned to change only in a way that is described in code. - So, far I haven't found such a tool. If you know one, I am happy to give it a try. :) |
Hi, is this still in the works? I'd argue that at least this should be an option for those who choose to implement. Also I'd argue that two approvals post-plan is already a valid check against the plan and code changes. If you require plan and (for us two ) approvals, the auto-apply reduces the workflow. Currently the apply is just someone having to type yet another comment after approvals are already met (apply_requirements already provide the security for this).. that extra comment adds a lot of delay to a process that's already pretty repetitive and time-consuming if you're working on new terraform changes that are complex. If someone didn't like or want to use the feature they could choose not to, of course. This is for people who want more automation. |
I would like to second the points made here. Even if you would argue to require another additional action after approvals and mergeability checks have been done (which I can follow) - typing again |
We are using a GitHub Action that checks the approval status( + plan check + other compliance checks) and that comments It works well for us and could be a good workaround. |
We have some workflows where this could work. Are you interested in sharing the GitHub Action code you use? |
@nikovirtala: it's a messy script that I am not allowed to share 😞 I can share that we're looking to move to using Open Policy Agent for auto-approvals and auto-applies( see "Terraform Code Reviews: Supercharged with Conftest" talk from HashiTalks 2020, with code at Blokje5/validating-terraform-with-conftest). Also, check out the actions in sdras/awesome-actions, especially:
I do have a plan to write all this up and open-source it, but I have no idea when I'll get to it. |
@Vlaaaaaaad No worries! – It will be a fun task to pull those strings together 😄 We are heavy users of Dependabot and applying pre-approved modules is one of those workflows where I miss the auto-apply. |
As part of the workflow we would like to see, when a PR has been reviewed, we would like the apply step to automatically pick up the fact that it has been reviewed and is good to go then to auto perform the apply step.
If changes are required on the PR, do not apply automatically once approved, but once all issues with the PR have been resolved. I believe this workflow would also work with alot of cases.
Currently with the action of having to have to enter the apply steps will be an organizational learning experience we would rather not have to teach Devs the complete in and outs of Terraform right off the bat.
The text was updated successfully, but these errors were encountered: