An open API service indexing awesome lists of open source software.

https://github.com/workloads/github-organization

Terraform-managed GitHub Resources
https://github.com/workloads/github-organization

github terraform

Last synced: 5 months ago
JSON representation

Terraform-managed GitHub Resources

Awesome Lists containing this project

README

          

# HCP Terraform Workspace `repositories`

> This repository manages GitHub Configuration for [@workloads](https://github.com/workloads).

## Table of Contents

* [HCP Terraform Workspace `repositories`](#hcp-terraform-workspace-repositories)
* [Table of Contents](#table-of-contents)
* [Requirements](#requirements)
* [Development](#development)
* [Usage](#usage)
* [Inputs](#inputs)
* [Outputs](#outputs)
* [Notes](#notes)
* [API Rate Limits](#api-rate-limits)
* [Contributors](#contributors)
* [License](#license)

## Requirements

- HashiCorp Terraform `1.12.x` or [newer](https://developer.hashicorp.com/terraform/downloads)

### Development

For development and testing of this repository:

- `terraform-docs` `0.20.0` or [newer](https://terraform-docs.io/user-guide/installation/)

## Usage

This repository uses a standard Terraform workflow (`init`, `plan`, `apply`).

For more information, including detailed usage guidelines, see the [Terraform documentation](https://developer.hashicorp.com/terraform/cli/commands).

### Inputs

| Name | Description | Type | Required |
|------|-------------|------|:--------:|
| github_owner | This is the target GitHub organization or individual user account to manage. | `string` | yes |
| github_token | A GitHub OAuth / Personal Access Token. | `string` | yes |
| tfe_organization | Name of HCP Terraform Organization. | `string` | yes |
| tfe_team_token_viewers | HCP Terraform `viewers` Team Token. | `string` | yes |
| github_organization_email | E-mail address to use for GitHub Organization. | `string` | no |
| issue_labels_hashicorp | HashiCorp Product-specific Issue Labels. |

list(object({
color = string
description = optional(string)
name = string
}))
| no |
| organization_members | User Names and Team Associations of GitHub Organization Members. |
list(object({
username = string
teams = list(string)
}))
| no |
| organization_owners | User Names of GitHub Organization Owners. | `list(string)` | no |
| outside_collaborators | Map of Outside Collaborators. | `map(list(string))` | no |
| repositories | List of GitHub Repositories. |
list(object({
name = string
description = string
homepage_url = string
visibility = string
topics = list(string)
has_issues = bool # TODO: mark as optional
has_wiki = bool # TODO: mark as optional
allow_merge_commit = bool
allow_rebase_merge = bool
delete_branch_on_merge = bool
}))
| no |
| reviewer_teams | List of Reviewer Teams. |
list(object({
name_suffix = string
description = string
privacy = optional(string, "closed")
}))
| no |
| terraform_repositories | List of GitHub Repositories. |
list(object({
name = string
description = string
homepage_url = string
visibility = string
topics = list(string)
has_issues = optional(bool)
has_wiki = optional(bool)
allow_merge_commit = bool
allow_rebase_merge = bool
delete_branch_on_merge = bool
}))
| no |
| tool_versions_config | List of Tool Versions. |
map(object({
version = string
}))
| no |

### Outputs

| Name | Description |
|------|-------------|
| github_actions_organization_tool_versions | GitHub Actions Organization Tool Versions. |
| github_repository_slugs | GitHub Repository slugs. |
| github_terraform_repository_slugs | GitHub Terraform Repository slugs. |
| github_urls | GitHub URLs. |
| nomad_pack_registry_commands | Nomad Pack CLI Commands for Registry operations. |
| tfe_workspace_terraform_version | Terraform version identifier of current HCP Terraform Workspace. |
| workspace_url | HCP Terraform Workspace URL. |

## Notes

### API Rate Limits

GitHub API interactions for non-Enterprise accounts are [limited](https://docs.github.com/en/rest/rate-limit?apiVersion=2022-11-28) to _1000_ requests per hour per repository.

The large number of resources in the `@workloads/github-organization` repository may result in rate exhaustion when `plan` and `apply` runs are carried out repeatedly and in short succession.

> **Note**
> For `@workloads/maintainers`: The [Makefile](https://github.com/workloads/assets/blob/main/scripts/Makefile) in `workloads/assets` provides a target to retrieve the current API usage with `make get-gh-rate-limits`

## Contributors

For a list of current (and past) contributors to this repository, see [GitHub](https://github.com/workloads/github-organization/graphs/contributors).

## License

Licensed under the Apache License, Version 2.0 (the "License").

You may download a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).

See the License for the specific language governing permissions and limitations under the License.