atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

Multiple GH apps should work with 1 Atlantis instance.

Open nishkrishnan opened this issue 5 years ago • 5 comments

GH app support is written in a way which only supports 1 installation and 1 app id on a given instance. This is not very flexible and if Atlantis can support multiple VCS providers at once it should be able to support multiple gh apps as well.

I can look into adding this feature when I get some time.

nishkrishnan avatar Oct 19 '20 21:10 nishkrishnan

@nishkrishnan am I understanding correctly that the ask here is to support different credentials on a repository by repository basis?

acastle avatar Dec 14 '20 21:12 acastle

i think a good example here is that let's say an organization is running public github and github enterprise. To support repos in both, you'd need to either have a github app created on both platforms OR configure webhooks on both platforms.

Currently with the former, we'd need separate atlantis instances but with the latter a single atlantis instance can be used.

So we'd need to do the following:

  1. support more than just one set of credentials for a given instance
  2. use the installation id sent in the event, instead of querying for it, which would also as a bonus allow more than one installation of the app

nishkrishnan avatar Dec 14 '20 21:12 nishkrishnan

This is a great idea @nishkrishnan! Do you have any suggestions of how we'd go about configuring atlantis for this use case? I bailed at attempting to address mutliple github apps in the PR that added the integration but would love to see a more flexible approach land in a future release, and will gladly help nurse along a PR.

unRob avatar Jan 05 '21 03:01 unRob

Please see my PR #4579 which I think goes a long way to supporting this. Please let me know what you think @nishkrishnan @acastle @unRob.

john-tipper avatar May 20 '24 21:05 john-tipper

I think that #4579 is a great feature, but it's different from this request. It's not always possible to use a single app installed in multiple organizations. If users want to keep their app private, they can install it only in the organization it is created in (making it public is a security concern; someone else might be able to install it).

laughedelic avatar May 28 '24 15:05 laughedelic

Adding to this issue, Github now supports enterprise scoped apps: https://github.blog/changelog/2024-10-22-enterprises-can-create-github-apps-for-use-within-the-enterprise/

That being said, even with the referenced PRs, you can't run Atlantis with a single app installed in multiple organizations, as Atlantis will only use a single gh-installation-id. So the only solution right now is to have multiple Atlantis instances with a GH App each.

cmartell-at-m42 avatar Apr 17 '25 18:04 cmartell-at-m42