Skip to content
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

GitHub configuration with OpenTofu #42

Closed
wants to merge 1 commit into from

Conversation

lmilbaum
Copy link
Contributor

@lmilbaum lmilbaum commented Oct 9, 2023

Changes introduced with this PR

GitHub configuration with OpenTofu


By contributing to this repository, I agree to the contribution guidelines.

@lmilbaum lmilbaum requested a review from a team October 9, 2023 19:07
@lmilbaum lmilbaum self-assigned this Oct 9, 2023
Copy link
Contributor

@jdowni000 jdowni000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an awesome submission and I really liked the demo. As long as we address the weeds of what is exactly allowed to be auto-merged and feel comfortable with the configs I love this. This makes it extremely easy to handle the settings across the org and additional repositories added

Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be helpful for automating a lot of settings across all of our repositories, including those for plugins and engine components.

Copy link
Member

@Harshith-umesh Harshith-umesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on reading the benefits, terraform seems to be a good addition.

@ghost
Copy link

ghost commented Jan 2, 2024

Since Terraform is no longer open source and I work on OpenTofu now, can I suggest using OpenTofu? :D Also, you may find some inspiration here: https://github.com/ContainerSSH/github-terraform

@lmilbaum
Copy link
Contributor Author

lmilbaum commented Jan 2, 2024

Since Terraform is no longer open source and I work on OpenTofu now, can I suggest using OpenTofu? :D Also, you may find some inspiration here: https://github.com/ContainerSSH/github-terraform

+1

@dustinblack
Copy link
Member

We discussed this today in the community meeting, and it is something that we see value in pursuing. Our work on DevOps tasks for the org has been limited recently, so we haven't yet scoped in the work, but the team agrees that we should get this on the backlog even as an internal need.

We are relying on the expert opinions of @lmilbaum and @janosdebugs here since we don't otherwise have the Terraform experience, so we trust that OpenTofu may be the best way to go. Can you take the time to update the proposal to reflect this change and any corresponding details?

@lmilbaum lmilbaum changed the title GitHub configuration with Terraform GitHub configuration with OpenTofu Feb 13, 2024
@lmilbaum lmilbaum force-pushed the github-configuration branch from a9a98fe to 1f33756 Compare February 13, 2024 11:59
@lmilbaum
Copy link
Contributor Author

We discussed this today in the community meeting, and it is something that we see value in pursuing. Our work on DevOps tasks for the org has been limited recently, so we haven't yet scoped in the work, but the team agrees that we should get this on the backlog even as an internal need.

We are relying on the expert opinions of @lmilbaum and @janosdebugs here since we don't otherwise have the Terraform experience, so we trust that OpenTofu may be the best way to go. Can you take the time to update the proposal to reflect this change and any corresponding details?

Updated the proposal. I'll also update the code to use OpenTofu as soon as the proposal approved.

@dustinblack
Copy link
Member

After community discussion, I want to re-open voting for this proposal and finalize whether we choose to move forward with OpenTofu. Starting from today, let's make it a 10 workin gday period for voting so that a decision can be discussed in the next community meeting on June 17th. So voting closes on Friday, June 14th.

Copy link
Contributor

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually not entirely sure how this would work in practice, much less when anyone would find bandwidth to work on it; but at least in principle having central infrastructure management of GitHub repo configuration sounds like a great idea.

Copy link
Contributor

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inclined to abstain.

Clearly, manual maintenance of ~60 repositories has been painful, and it's unlikely to get better. And, to the extent that we expect to create additional repositories, applying IaC techniques would be key. But, I have no idea whether OpenTofu is the "best" choice for that.

The best power of IaC is in setting up new infrastructure. However, it seems unlikely that we will ever set up a new Arcalot on GitHub. Far more likely is that we will need to make changes to the existing setup, and the question is, would that be best done through OpenTofu, or should we be looking to GitHub native features for that administration?

At one extreme, the Github Organization serves as a centralized locus of control. For that, we don't need OpenTofu. At the opposite extreme, we will presumably have a need to make changes to single repos. Again, for that we don't need OpenTofu. So, the times when we would need something like OpenTofu are for making changes to non-trivial subsets of our repos, and I'm not sure that that is anything that we will do often enough to justify creating the requisite definitions to use in OpenTofu.

Perhaps I would think differently if I'd seen the demo or if I thought that we would have a repeated need for tweaking large numbers of repos. However, my intuition is that, if the individual repos are set up appropriately, then we should be able to make changes at the organization-level rather than touching the individual repos. The question then becomes, how do we straighten out the repos that we have and ensure that new repos conform to the organization requirements? OpenTofu might be a good answer to that, or it might be a solution in search of a problem.

Comment on lines +2 to +3

Automate and manage GitHub configuration with [OPenTofu][1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace P with p in OPenTofu.

Copy link

@ghost ghost Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I may stick my nose into this issue as an outsider/OpenTofu core dev, OpenTofu is not the best choice for this, that would be GitHub Enterprise. AFAIK there are several security settings you can't enforce on repos unless you have enterprise. I wrote a tool a while ago to fill the gap, but haven't continued developing it. As a side note, joining the CNCF would get you access to GitHub Enterprise if I remember correctly.

As far as OpenTofu is concerned, you would need to have make sure no changes are made outside of OpenTofu and/or you'll have to deal with configuration drift.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your nose is always welcome. ;)

I'll check with Amye at the CNCF about the GitHub Enterprise question. If that is the case, and if we are ready to put ourselves on the CNCF sandbox track now, then perhaps that is the better approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a great idea

Copy link
Member

@dustinblack dustinblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holding my vote until I know more about the CNCF Github Enterprise question.

@mfleader mfleader self-requested a review June 6, 2024 16:59
Copy link
Member

@dustinblack dustinblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still waiting on feedback from the CNCF about the use of GitHub enterprise. We obviously aren't banking on joining the Sandbox projects, but an effort now with OpenTofu may end up redundant if we do go that route. I'm also concerned about our ability to provide resources any time soon to implement this change. So for now, I'm voting against this, but I may like to see it revisited in the future.

@dustinblack dustinblack force-pushed the github-configuration branch from 1f33756 to d29e540 Compare June 10, 2024 17:11
@webbnh

This comment was marked as off-topic.

@dustinblack
Copy link
Member

dustinblack force-pushed the github-configuration branch from 1f33756 to d29e540
12 minutes ago

@dustinblack, what did you change?

Just rebased.

@webbnh
Copy link
Contributor

webbnh commented Jun 10, 2024

Just rebased.

You can do that when the PR is merged out. Given that there are no dependencies between branches in this repo, there's no need to rebase in the middle of a review.

Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the new info, I will now reject this proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants