/github-organization

Terraform-managed GitHub Resources

Primary LanguageHCLApache License 2.0Apache-2.0

HCP Terraform Workspace repositories

This repository manages GitHub Configuration for @workloads.

Table of Contents

Requirements

  • HashiCorp Terraform 1.9.x or newer

Development

For development and testing of this repository:

  • terraform-docs 0.18.0 or newer

Usage

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

For more information, including detailed usage guidelines, see the Terraform documentation.

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
actions_config Complex Object of GitHub Actions Configuration.
map(object({
owner = string
repository = string

# support GitHub Actions that share a repository and are stored in a sub-directory
# value is optional and must be supplied without leading slash
path = optional(string)

version = string
}))
no
config (optional) describe your variable map(any) no
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
scorecard_checks OpenSSF Scorecard Checks. string 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_actions_releases GitHub Actions Releases.
github_repository_slugs GitHub Repository slugs.
github_urls GitHub URLs.
nomad_pack_registry_commands Nomad Pack CLI Commands for Registry operations.
workspace_url HCP Terraform Workspace URL.

Notes

API Rate Limits

GitHub API interactions for non-Enterprise accounts are limited 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 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.

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.

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