2016-03-08 23:05:22 +01:00
|
|
|
---
|
|
|
|
layout: "github"
|
2016-04-07 16:26:01 +02:00
|
|
|
page_title: "GitHub: github_membership"
|
2016-03-08 23:05:22 +01:00
|
|
|
sidebar_current: "docs-github-resource-membership"
|
|
|
|
description: |-
|
2016-04-07 16:26:01 +02:00
|
|
|
Provides a GitHub membership resource.
|
2016-03-08 23:05:22 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# github\_membership
|
|
|
|
|
2016-04-07 16:26:01 +02:00
|
|
|
Provides a GitHub membership resource.
|
2016-03-08 23:05:22 +01:00
|
|
|
|
|
|
|
This resource allows you to add/remove users from your organization. When applied,
|
|
|
|
an invitation will be sent to the user to become part of the organization. When
|
|
|
|
destroyed, either the invitation will be cancelled or the user will be removed.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
# Add a user to the organization
|
|
|
|
resource "github_membership" "membership_for_some_user" {
|
2017-02-18 23:48:50 +01:00
|
|
|
username = "SomeUser"
|
|
|
|
role = "member"
|
2016-03-08 23:05:22 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `username` - (Required) The user to add to the organization.
|
2017-02-18 23:48:50 +01:00
|
|
|
* `role` - (Optional) The role of the user within the organization.
|
2016-03-08 23:05:22 +01:00
|
|
|
Must be one of `member` or `admin`. Defaults to `member`.
|