1. Packages
  2. Gitlab Provider
  3. API Docs
  4. GroupLdapLink
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.GroupLdapLink

Explore with Pulumi AI

The gitlab.GroupLdapLink resource allows to manage the lifecycle of an LDAP integration with a group.

Upstream API: GitLab REST API docs

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  test:
    type: gitlab:GroupLdapLink
    properties:
      groupId: '12345'
      cn: testuser
      groupAccess: developer
      ldapProvider: ldapmain
Copy

Create GroupLdapLink Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GroupLdapLink(name: string, args: GroupLdapLinkArgs, opts?: CustomResourceOptions);
@overload
def GroupLdapLink(resource_name: str,
                  args: GroupLdapLinkArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def GroupLdapLink(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  group: Optional[str] = None,
                  ldap_provider: Optional[str] = None,
                  access_level: Optional[str] = None,
                  cn: Optional[str] = None,
                  filter: Optional[str] = None,
                  force: Optional[bool] = None,
                  group_access: Optional[str] = None)
func NewGroupLdapLink(ctx *Context, name string, args GroupLdapLinkArgs, opts ...ResourceOption) (*GroupLdapLink, error)
public GroupLdapLink(string name, GroupLdapLinkArgs args, CustomResourceOptions? opts = null)
public GroupLdapLink(String name, GroupLdapLinkArgs args)
public GroupLdapLink(String name, GroupLdapLinkArgs args, CustomResourceOptions options)
type: gitlab:GroupLdapLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GroupLdapLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GroupLdapLinkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GroupLdapLinkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GroupLdapLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GroupLdapLinkArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var groupLdapLinkResource = new GitLab.GroupLdapLink("groupLdapLinkResource", new()
{
    Group = "string",
    LdapProvider = "string",
    Cn = "string",
    Filter = "string",
    Force = false,
    GroupAccess = "string",
});
Copy
example, err := gitlab.NewGroupLdapLink(ctx, "groupLdapLinkResource", &gitlab.GroupLdapLinkArgs{
	Group:        pulumi.String("string"),
	LdapProvider: pulumi.String("string"),
	Cn:           pulumi.String("string"),
	Filter:       pulumi.String("string"),
	Force:        pulumi.Bool(false),
	GroupAccess:  pulumi.String("string"),
})
Copy
var groupLdapLinkResource = new GroupLdapLink("groupLdapLinkResource", GroupLdapLinkArgs.builder()
    .group("string")
    .ldapProvider("string")
    .cn("string")
    .filter("string")
    .force(false)
    .groupAccess("string")
    .build());
Copy
group_ldap_link_resource = gitlab.GroupLdapLink("groupLdapLinkResource",
    group="string",
    ldap_provider="string",
    cn="string",
    filter="string",
    force=False,
    group_access="string")
Copy
const groupLdapLinkResource = new gitlab.GroupLdapLink("groupLdapLinkResource", {
    group: "string",
    ldapProvider: "string",
    cn: "string",
    filter: "string",
    force: false,
    groupAccess: "string",
});
Copy
type: gitlab:GroupLdapLink
properties:
    cn: string
    filter: string
    force: false
    group: string
    groupAccess: string
    ldapProvider: string
Copy

GroupLdapLink Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GroupLdapLink resource accepts the following input properties:

Group
This property is required.
Changes to this property will trigger replacement.
string
The ID or URL-encoded path of the group
LdapProvider
This property is required.
Changes to this property will trigger replacement.
string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
AccessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

Cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
Filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
Force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
GroupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
Group
This property is required.
Changes to this property will trigger replacement.
string
The ID or URL-encoded path of the group
LdapProvider
This property is required.
Changes to this property will trigger replacement.
string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
AccessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

Cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
Filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
Force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
GroupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
group
This property is required.
Changes to this property will trigger replacement.
String
The ID or URL-encoded path of the group
ldapProvider
This property is required.
Changes to this property will trigger replacement.
String
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. String
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. String
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. Boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
groupAccess Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
group
This property is required.
Changes to this property will trigger replacement.
string
The ID or URL-encoded path of the group
ldapProvider
This property is required.
Changes to this property will trigger replacement.
string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
groupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
group
This property is required.
Changes to this property will trigger replacement.
str
The ID or URL-encoded path of the group
ldap_provider
This property is required.
Changes to this property will trigger replacement.
str
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
access_level Changes to this property will trigger replacement. str
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. str
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. str
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
group_access Changes to this property will trigger replacement. str
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
group
This property is required.
Changes to this property will trigger replacement.
String
The ID or URL-encoded path of the group
ldapProvider
This property is required.
Changes to this property will trigger replacement.
String
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. String
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. String
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. Boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
groupAccess Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Outputs

All input properties are implicitly available as output properties. Additionally, the GroupLdapLink resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing GroupLdapLink Resource

Get an existing GroupLdapLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GroupLdapLinkState, opts?: CustomResourceOptions): GroupLdapLink
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_level: Optional[str] = None,
        cn: Optional[str] = None,
        filter: Optional[str] = None,
        force: Optional[bool] = None,
        group: Optional[str] = None,
        group_access: Optional[str] = None,
        ldap_provider: Optional[str] = None) -> GroupLdapLink
func GetGroupLdapLink(ctx *Context, name string, id IDInput, state *GroupLdapLinkState, opts ...ResourceOption) (*GroupLdapLink, error)
public static GroupLdapLink Get(string name, Input<string> id, GroupLdapLinkState? state, CustomResourceOptions? opts = null)
public static GroupLdapLink get(String name, Output<String> id, GroupLdapLinkState state, CustomResourceOptions options)
resources:  _:    type: gitlab:GroupLdapLink    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

Cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
Filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
Force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
Group Changes to this property will trigger replacement. string
The ID or URL-encoded path of the group
GroupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
LdapProvider Changes to this property will trigger replacement. string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
AccessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

Cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
Filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
Force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
Group Changes to this property will trigger replacement. string
The ID or URL-encoded path of the group
GroupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
LdapProvider Changes to this property will trigger replacement. string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. String
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. String
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. Boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
group Changes to this property will trigger replacement. String
The ID or URL-encoded path of the group
groupAccess Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
ldapProvider Changes to this property will trigger replacement. String
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. string
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. string
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
group Changes to this property will trigger replacement. string
The ID or URL-encoded path of the group
groupAccess Changes to this property will trigger replacement. string
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
ldapProvider Changes to this property will trigger replacement. string
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
access_level Changes to this property will trigger replacement. str
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. str
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. str
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. bool
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
group Changes to this property will trigger replacement. str
The ID or URL-encoded path of the group
group_access Changes to this property will trigger replacement. str
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
ldap_provider Changes to this property will trigger replacement. str
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain
accessLevel Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner

Deprecated: Use group_access instead of the access_level attribute.

cn Changes to this property will trigger replacement. String
The CN of the LDAP group to link with. Required if filter is not provided.
filter Changes to this property will trigger replacement. String
The LDAP filter for the group. Required if cn is not provided. Requires GitLab Premium or above.
force Changes to this property will trigger replacement. Boolean
If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
group Changes to this property will trigger replacement. String
The ID or URL-encoded path of the group
groupAccess Changes to this property will trigger replacement. String
Minimum access level for members of the LDAP group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner
ldapProvider Changes to this property will trigger replacement. String
The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the label attribute as shown in the web UI. In most cases this will be ldapmain but you may use the LDAP check rake task for receiving the LDAP server name: LDAP: ... Server: ldapmain

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_group_ldap_link. For example:

terraform

import {

to = gitlab_group_ldap_link.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

GitLab group ldap links can be imported using an id made up of group_id:ldap_provider:cn:filter. CN and Filter are mutually exclusive, so one will be missing.

If using the CN for the group link, the ID will end with a blank filter (":"). e.g.,

$ pulumi import gitlab:index/groupLdapLink:GroupLdapLink test "12345:ldapmain:testcn:"
Copy

If using the Filter for the group link, the ID will have two “::” in the middle due to having a blank CN. e.g.,

$ pulumi import gitlab:index/groupLdapLink:GroupLdapLink test "12345:ldapmain::testfilter"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.