A Terraform module to manage GitHub Teams. https://github.com/
A Terraform module that offers a more convenient and tested way to provision and manage GitHub teams.
This module supports Terraform v1.x and is compatible with the Official Terraform GitHub Provider v4.x from integrations/github
.
Attention: This module is incompatible with the Hashicorp GitHub Provider! The latest version of this module supporting hashicorp/github
provider is ~> 0.6.0
This module supports the following resources:
module "team" {
source = "mineiros-io/team/github"
version = "~> 0.8.0"
name = "DevOps"
description = "The DevOps Team"
privacy = "secret"
members = [
"a-user",
"b-user"
]
maintainers = [
"a-maintainer"
]
push_repositories = [
github_repository.repository.name,
]
}
resource "github_repository" "repository" {
name = "a-repository"
}
provider "github" {}
terraform {
required_version = "~> 1.0"
required_providers {
github = {
source = "integrations/github"
version = "~> 4.0"
}
}
}
See variables.tf and examples/ for details and use-cases.
name
: (Required string
)
The name of the team.
description
: (Optional string
)
A description of the team.
Default is ""
.
privacy
: (Optional string
)
The level of privacy for the team. Must be one of secret
or closed
.
Default is "secret"
.
parent_team_id
: (Optional number
)
The ID of the parent team, if this is a nested team.
Default is to create a root team without a parent.
ldap_dn
: (Optional string
)
The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.
create_default_maintainer
: (Optional bool
)
Adds the creating user to the team when set to true
."
Default is false
.
maintainers
: (Optional set(string)
)
A list of users that will be added to the current team with maintainer permissions.
Default is []
.
members
: (Optional set(string)
)
A list of users that will be added to the current team with member permissions.
Default is []
.
admin_repositories
: (Optional set(string)
)
A list of repository names the current team should get admin permission to.
Default is []
.
maintain_repositories
: (Optional set(string)
)
A list of repository names the current team should get maintain permission to.
Default is []
.
push_repositories
: (Optional set(string)
)
A list of repository names the current team should get push (read-write) permission to.
Default is []
.
triage_repositories
: (Optional set(string)
)
A list of repository names the current team should get push (triage) permission to.
Default is []
.
pull_repositories
: (Optional set(string)
)
A list of repository names the current team should get pull (read-only) permission to.
Default is []
.
module_depends_on
: (Optional list(object)
)
A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.
Default is []
.
module_enabled
: (Optional bool
)
Specifies whether resources in the module will be created.
Default is true
.
The following attributes are exported in the outputs of the module:
id
: (string
)
The ID of the team.
name
: (string
)
The name of the team.
slug
: (string
)
The Slug of the team.
team
: (object(team)
)
The full team object.
team_memberships
: (list(team_membership)
)
A list of all team memberships.
team_repositories
: (list(team_repository)
)
A list of all team repositories.
This Module follows the principles of Semantic Versioning (SemVer).
Given a version number MAJOR.MINOR.PATCH
, we increment the:
MAJOR
version when we make incompatible changes,MINOR
version when we add functionality in a backwards compatible manner, andPATCH
version when we make backwards compatible bug fixes.0.0.z
and 0.y.z
version0.0.z
is not guaranteed when z
is increased. (Initial development)0.y.z
is not guaranteed when y
is increased. (Pre-release)Mineiros is a remote-first company headquartered in Berlin, Germany that solves development, automation and security challenges in cloud infrastructure.
Our vision is to massively reduce time and overhead for teams to manage and deploy production-grade and secure cloud infrastructure.
We offer commercial support for all of our modules and encourage you to reach out if you have any questions or need help. Feel free to email us at [email protected] or join our Community Slack channel.
GitHub as Code is a commercial solution built on top of our open-source Terraform modules for GitHub. It helps our customers to manage their GitHub organization more efficiently by enabling anyone in their organization to self-service manage on- and offboarding of users, repositories, and settings such as branch protections, secrets, and more through code.
For details please see https://www.mineiros.io/github-as-code.
We use GitHub Issues to track community reported issues and missing features.
Contributions are always encouraged and welcome! For the process of accepting changes, we use Pull Requests. If you'd like more information, please see our Contribution Guidelines.
This repository comes with a handy Makefile.
Run make help
to see details on each available target.
This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.
Copyright © 2020-2022 Mineiros GmbH