portray or describe (something) precisely.
This repo demonstrates using Hashicorp Terraform to manage a GitHub organisation and it's repositories.
Explore the docs »
Report Bug
·
Request Feature
- About The Project
- Built With
- Terraform Cloud Setup
- Manage Repos
- GitHub Automation
- Roadmap
- Contributing
- License
- Acknowledgements
This repo provides a Terraform configuration to manage a GitHub organisation. The solution uses Terraform Cloud as the centralised provisioning infrastructure to manage state and required secrets.
Further logos can be inserted to highlight the specific technologies used to create the solution from here.
Syntax | Description |
---|---|
Pre-commit git hooks that perform checks before pushes |
|
Source control management platform | |
Providing of a standardised local environment | |
GitHub provisioning configuration |
A Terraform Cloud account will be required. In this example there are two workspaces defined, these workspaces are configured using Terraform remote backend files here.
Two env variables need to be configured in each Terraform Cloud workspace for GitHub
GITHUB_OWNER
should be set to the organisation slugGITHUB_TOKEN
is the GitHub personal access token (PAT)
To create a new GitHub PAT then review the official documentation here.
The repos to create and manage are defined in the auto.tfvars
file here. The following attributes can be confirmed per repo.
name = string
description = string
homepage_url = optional(string, "")
branch_protection = optional(bool, true)
default_branch = optional(string, "main")
topics = optional(list(string), [])
maintainers = optional(list(string), [])
members = optional(list(string), [])
visibility = optional(string, "public")
archived = optional(bool, false)
is_vercel_project = optional(bool, false)
is_template = optional(bool, false)
For the exact configuration that runs review the organisation config and repo module. The following commands can be used:
# Test organisation plan and apply
task test:plan
task test:apply
# Prod organisation plan and apply
task prod:plan
task prod:apply
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you would like to contribute to any delineate.io OSS projects please read:
Distributed under the MIT License. See LICENSE
for more information.