runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.82k stars 1.06k forks source link

How to restrict run for gitlab #2549

Open vl-shopback opened 2 years ago

vl-shopback commented 2 years ago

Community Note


Describe the user story As a Gitlab user, i would like to have the feature to restrict person who is able run the atlantis, but current GetTeamNamesForUser in Gitlab return nil, unlike other vcs will return user group to check the permission

https://github.com/runatlantis/atlantis/blob/master/server/events/vcs/gitlab_client.go#L361-L363

Describe the solution you'd like Return the user id/name, we can restrict the user based on their id/name, use it like team name in other vcs

Describe the drawbacks of your solution Need to use some default value to make all user is able to run as that's the default behaviour for current gitlab

Describe alternatives you've considered NA

michelmzs commented 2 years ago

Do you mean "How to restrict GitLab users to running Atlantis commands?"

An option is enabling apply requirements. So you can restrict MRs that are approved by specific users.

peikk0 commented 11 months ago

I've opened #4001 to add support for GitLab groups.