How would one configure atlantis to post a pending...
# atlantis-community
n
How would one configure atlantis to post a pending status check for applys when using auto-planning? With a large number of TF modules that have plans, it's hard to keep track of which I've applied in a PR or not
c
I'm not sure what you're asking. At least for me, when I have it on a github repo, I see a status check for each root and then an overall status check that only turns green when all other applies have been applied.
so I'll have say, three status checks:
Copy code
atlantis-prod/apply
atlantis-prod/apply: my-project
atlantis-prod apply: your-project
I didn't do anything special for that.
n
On my end Atlantis only sets a status check for apply after I run an apply. I hoped that it would set a status check of non-green for apply before I run apply Seems like it might be a bug?
c
Huh. I get one before:
Do you have the apply as an expected status check?
That might be what's doing it.
n
yeah, that's exactly what I want. I can't figure out why it does not work like that for me
Do you have the apply as an expected status check?
What does it mean to have apply as expected status check? Is that a setting?
It shows nothing for apply status checks, unless I run
atlantis apply
c
In branch protection, you can say "require these status checks to pass before allowing merge"
I'd show you our config but I don't have privileges for it in our org 😛
n
☝️ 1
c
But basically we have it set so that
atlantis-prod/apply
and
atlantis-nonprod/apply
are green before merging is allowed
n
nothing is set for that on our repo
c
Yeah, I think that's why ours shows up before it runs.
n
ahhhh, I see. hmm, I wonder if this can work. We have lots of atlantis servers, each with a different name
not all PRs will trigger an apply for all atlantis servers
c
If they don't trigger an apply, it should go green.
In that one I posted, there's no nonprod changes
So it set atlantis-nonprod/plan and apply to green
n
Ah, thats it!
it worked, thank you so so much!
c
Great! Glad to help 🙂
❤️ 1
c
@Chastity Blackwell curious do you have atlantis-prod and atlantis-nonprod setup as two different github apps or a single app sharing the same creds etc? Im entirely new to github so confused if i should create an app for each atlantis server or if they can share the same app install.... Thank you!
c
Each server is a separate app.
✅ 1
So technically, we have
atlantis-nonprod-aws
,
atlantis-prod-aws
,
atlantis-nonprod-gcp
,
atlantis-prod-gcp
.
c
Makes sense, got confused by this note in the atlantis docs:
Manually installing the GitHub app means that the credentials can be shared by many Atlantis installations. This has the benefit of centralizing repository access for shared modules / code.
c
(because we have deployments in both AWS and GCP, so we have hosts in each rather than trying to mess with cross-cloud credentials or something)
I think what that is saying is that if you have many repositories, they can all use the same Atlantis apps
So if you had a
foo-infra
and a
bar-infra
and a
baz-infra
and they all defined AWS infrastructure, they could all use
atlantis-nonprod-aws
to deploy nonprod code
c
I see, I guess using the
/github-app/setup
atlantis endpoint wants to install the app at an individual user level or repo level, whereas I want an Organization wide install
c
So the way we did that was to have it create it as a user, and then transfer ownership to the organization.
c
Ah, good idea, the setup endpoint is certainly convenient
c
Worked fine, assuming you have administrative privs in the organization (or can work with someone who does).
Yeah. You can also just create it on your own too, but it is nice to just get it all automagically.
🙌 1