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
- Module Features
- Getting Started
- Module Argument Reference
- Module Outputs
- External Documentation
- Module Versioning
- About Mineiros
- GitHub as Code
- Reporting Issues
- Contributing
- Makefile Targets
- License
This module supports the following resources:
- Team
- Nested Team
- Memberships
- Team Repositories
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
: (Requiredstring
)The name of the team.
-
description
: (Optionalstring
)A description of the team.
Default is
""
. -
privacy
: (Optionalstring
)The level of privacy for the team. Must be one of
secret
orclosed
.Default is
"secret"
. -
parent_team_id
: (Optionalnumber
)The ID of the parent team, if this is a nested team.
Default is to create a root team without a parent.
-
ldap_dn
: (Optionalstring
)The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.
-
create_default_maintainer
: (Optionalbool
)Adds the creating user to the team when set to
true
."Default is
false
.
-
maintainers
: (Optionalset(string)
)A list of users that will be added to the current team with maintainer permissions.
Default is
[]
. -
members
: (Optionalset(string)
)A list of users that will be added to the current team with member permissions.
Default is
[]
.
-
admin_repositories
: (Optionalset(string)
)A list of repository names the current team should get admin permission to.
Default is
[]
. -
maintain_repositories
: (Optionalset(string)
)A list of repository names the current team should get maintain permission to.
Default is
[]
. -
push_repositories
: (Optionalset(string)
)A list of repository names the current team should get push (read-write) permission to.
Default is
[]
. -
triage_repositories
: (Optionalset(string)
)A list of repository names the current team should get push (triage) permission to.
Default is
[]
. -
pull_repositories
: (Optionalset(string)
)A list of repository names the current team should get pull (read-only) permission to.
Default is
[]
.
-
module_depends_on
: (Optionallist(object)
)A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.
Default is
[]
. -
module_enabled
: (Optionalbool
)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.
- Backwards compatibility in versions
0.0.z
is not guaranteed whenz
is increased. (Initial development) - Backwards compatibility in versions
0.y.z
is not guaranteed wheny
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