Files
opentf/website/source/docs/providers/github/r/team_membership.html.markdown
Seth Vargo 4fde3b2be9 Capitalize the H in GitHub
GitHub really doesn't like when you make the H lowercase, it violates
their brand guidelines and they won't help promote anything that doesn't
use the capital H.
2016-04-07 10:26:01 -04:00

1.2 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
github GitHub: github_team_membership docs-github-resource-team-membership Provides a GitHub team membership resource.

github_team_membership

Provides a GitHub team membership resource.

This resource allows you to add/remove users from teams in your organization. When applied, the user will be added to the team. If the user hasn't accepted their invitation to the organization, they won't be part of the team until they do. When destroyed, the user will be removed from the team.

Example Usage

# Add a user to the organization
resource "github_membership" "membership_for_some_user" {
    username = "SomeUser"
    role = "member"
}

resource "github_team" "some_team" {
	name = "SomeTeam"
	description = "Some cool team"
}

resource "github_team_membership" "some_team_membership" {
	team_id = "${github_team.some_team.id}"
	username = "SomeUser"
	role = "member"
}

Argument Reference

The following arguments are supported:

  • team_id - (Required) The GitHub team id
  • username - (Required) The user to add to the team.
  • role - (Optional) The role of the user within the team. Must be one of member or maintainer. Defaults to member.