diff --git a/art-decisions/proposals/2023-10-09-github-configuration-as-code.md b/art-decisions/proposals/2023-10-09-github-configuration-as-code.md new file mode 100644 index 0000000..25968b7 --- /dev/null +++ b/art-decisions/proposals/2023-10-09-github-configuration-as-code.md @@ -0,0 +1,64 @@ +# GitHub Configuration as Code + +Automate and manage GitHub configuration with [OPenTofu][1] + +## Voting Period + +The voting period for this proposal will be open for 10 days from its submission. + +## Benefits + +OpenTofu is typically not used to configure GitHub repositories directly; +instead, it is primarily used for infrastructure as code (IaC) to provision and +manage cloud resources and infrastructure components. However, there might be +scenarios where we would want to use it in conjunction with GitHub +repositories or GitHub Actions to automate and manage certain aspects of our +GitHub configuration. Here are some reasons why we might consider using +it for such tasks: + +1. Infrastructure as Code (IaC) Consistency: If the development workflow relies +heavily on GitHub repositories, using OpenTofu allows to define and maintain +GitHub configuration as code, ensuring consistency and reproducibility across +all current and future projects. + +2. Automated Repository Setup: OpenTofu can be used to automate the creation of +GitHub repositories, organizations, teams, and access controls. This can be +especially useful if we have a large number of repositories to manage or need to +set up repositories with a specific structure or permissions. + +3. Integration with Other Infrastructure: If our application's infrastructure is +defined and managed using OpenTofu, we can integrate our GitHub repository +setup into our broader infrastructure provisioning process. For example, we +might need to create a new repository as part of deploying a new application. + +4. Version Control and Collaboration: Just like with infrastructure code, +storing our GitHub configuration in version-controlled OpenTofu code enables +collaboration, code review, and change tracking. We can use Git to manage +changes to our GitHub configurations. + +5. Documentation and Compliance: By defining our GitHub configurations in +OpenTofu, we can create documentation that describes our organization's GitHub +policies, repository structures, and access controls. This documentation can be +versioned alongside the codebase. + +6. Cross-Cloud and Multi-Platform Environments: If our organization uses +multiple cloud providers or platforms and needs to manage GitHub repositories +across them, OpenTofu provides a unified way to define and manage these +resources. + +7. Scaling and Managing Growth: As the organization grows, we may need to create +and manage numerous repositories. OpenTofu allows to scale the GitHub +repository management processes efficiently. + +8. Change Management: With OpenTofu, we can easily make changes to our GitHub +configurations, such as adding or removing collaborators, updating team +permissions, or modifying repository settings, all while maintaining version +history and change tracking. + +In summary, while OpenTofu is not the primary tool for configuring GitHub +repositories, it can be a valuable addition to our DevOps toolkit when we need +to automate, manage, and maintain GitHub configurations in a consistent and +reproducible manner, especially in the context of larger infrastructure and +development workflows. + +[1]: https://github.com/platform-engineering-org/terraform-github-configuration-module