Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2 KB

group_membership.md

File metadata and controls

56 lines (40 loc) · 2 KB
page_title subcategory description
gitlab_group_membership Resource - terraform-provider-gitlab
The gitlab_group_membership resource allows to manage the lifecycle of a users group membersip. -> If a group should grant membership to another group use the gitlab_group_share_group resource instead. Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/members.html

gitlab_group_membership (Resource)

The gitlab_group_membership resource allows to manage the lifecycle of a users group membersip.

-> If a group should grant membership to another group use the gitlab_group_share_group resource instead.

Upstream API: GitLab REST API docs

Example Usage

resource "gitlab_group_membership" "test" {
  group_id     = "12345"
  user_id      = 1337
  access_level = "guest"
  expires_at   = "2020-12-31"
}

Schema

Required

  • access_level (String) Access level for the member. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master.
  • group_id (String) The id of the group.
  • user_id (Number) The id of the user.

Optional

  • expires_at (String) Expiration date for the group membership. Format: YYYY-MM-DD
  • skip_subresources_on_destroy (Boolean) Whether the deletion of direct memberships of the removed member in subgroups and projects should be skipped. Only used during a destroy.
  • unassign_issuables_on_destroy (Boolean) Whether the removed member should be unassigned from any issues or merge requests inside a given group or project. Only used during a destroy.

Read-Only

  • id (String) The ID of this resource.

Import

Import is supported using the following syntax:

# GitLab group membership can be imported using an id made up of `group_id:user_id`, e.g.
terraform import gitlab_group_membership.test "12345:1337"