| layout | github |
|---|---|
| page_title | GitHub: github_team |
| description | Provides a GitHub team resource. |
Provides a GitHub team resource.
This resource allows you to add/remove teams from your organization. When applied, a new team will be created. When destroyed, that team will be removed.
# Add a team to the organization
resource "github_team" "some_team" {
name = "some-team"
description = "Some cool team"
privacy = "closed"
notification_setting = "notifications_enabled"
}The following arguments are supported:
name- (Required) The name of the team.description- (Optional) A description of the team.privacy- (Optional) The level of privacy for the team. Must be one ofsecretorclosed. Defaults tosecret.notification_setting- (Optional) The notification setting for the team. Must be one ofnotifications_enabledornotifications_disabled. Defaults tonotifications_disabledparent_team_id- (Optional) The ID or slug of the parent team, if this is a nested team.ldap_dn- (Optional) The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.create_default_maintainer- (Optional) Adds a default maintainer to the team. Defaults tofalseand adds the creating user to the team whentrue.
The following attributes are exported:
id- The ID of the created team.node_id- The Node ID of the created team.slug- The slug of the created team, which may or may not differ fromname, depending on whethernamecontains "URL-unsafe" characters. Useful when referencing the team ingithub_branch_protection.
GitHub Teams can be imported using the GitHub team ID or name e.g.
$ terraform import github_team.core 1234567
$ terraform import github_team.core Administrators