Skip to content

dhoppeIT/terraform-gitlab-group_membership

Repository files navigation

terraform-gitlab-group_membership

Terraform module to manage the following Twingate resources:

  • gitlab_group_membership

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "gitlab_group" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-group/local"
  version = "1.1.4"

  name = "Example (group)"
  path = "example-group-48165"
}

module "gitlab_user" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-user/local"
  version = "1.2.0"

  name     = "John Doe"
  username = "jdoe"
  password = "XKvhCJp9MtwTgwRu" # gitleaks:allow
  email    = "[email protected]"
}

module "gitlab_group_membership" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-group-membership/local"
  version = "1.0.0"

  group_id     = module.gitlab_group.id
  user_id      = module.gitlab_user.id
  access_level = "owner"
}

Requirements

Name Version
terraform >= 1.0
gitlab ~> 18.0

Providers

Name Version
gitlab ~> 18.0

Modules

No modules.

Resources

Name Type
gitlab_group_membership.this resource

Inputs

Name Description Type Default Required
access_level Access level for the member string n/a yes
expires_at Expiration date for the group membership string null no
group_id The id of the group string n/a yes
member_role_id The ID of a custom member role number null no
skip_subresources_on_destroy Whether the deletion of direct memberships of the removed member in subgroups and projects should be skipped bool false no
unassign_issuables_on_destroy Whether the removed member should be unassigned from any issues or merge requests inside a given group or project bool false no
user_id The id of the user number n/a yes

Outputs

Name Description
id The ID of this resource

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.