Show / Hide Table of Contents

Namespace Pulumi.GitLab

Classes

BranchProtection

This resource allows you to protect a specific branch by an access level so that the user with less access level cannot Merge/Push to the branch. GitLab EE features to protect by group or user are not supported.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var branchProtect = new GitLab.BranchProtection("branchProtect", new GitLab.BranchProtectionArgs
    {
        Branch = "BranchProtected",
        MergeAccessLevel = "developer",
        Project = "12345",
        PushAccessLevel = "developer",
    });
}

}

BranchProtectionArgs

BranchProtectionState

Config

DeployKey

This resource allows you to create and manage deploy keys for your GitLab projects.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.DeployKey("example", new GitLab.DeployKeyArgs
    {
        Key = "ssh-rsa AAAA...",
        Project = "example/deploying",
        Title = "Example deploy key",
    });
}

}

DeployKeyArgs

DeployKeyEnable

This resource allows you to enable pre-existing deploy keys for your GitLab projects.

the GITLAB KEY_ID for the deploy key must be known

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    // A repo to host the deployment key
    var parentProject = new GitLab.Project("parentProject", new GitLab.ProjectArgs
    {
    });
    // A second repo to use the deployment key from the parent project
    var fooProject = new GitLab.Project("fooProject", new GitLab.ProjectArgs
    {
    });
    // Upload a deployment key for the parent repo
    var parentDeployKey = new GitLab.DeployKey("parentDeployKey", new GitLab.DeployKeyArgs
    {
        Key = "ssh-rsa AAAA...",
        Project = parentProject.Id,
        Title = "Example deploy key",
    });
    // Enable the deployment key on the second repo
    var fooDeployKeyEnable = new GitLab.DeployKeyEnable("fooDeployKeyEnable", new GitLab.DeployKeyEnableArgs
    {
        KeyId = parentDeployKey.Id,
        Project = fooProject.Id,
    });
}

}

DeployKeyEnableArgs

DeployKeyEnableState

DeployKeyState

DeployToken

This resource allows you to create and manage deploy token for your GitLab projects and groups.

Example Usage - Project

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.DeployToken("example", new GitLab.DeployTokenArgs
    {
        ExpiresAt = "2020-03-14T00:00:00.000Z",
        Project = "example/deploying",
        Scopes = 
        {
            "read_repository",
            "read_registry",
        },
        Username = "example-username",
    });
}

}

Example Usage - Group

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.DeployToken("example", new GitLab.DeployTokenArgs
    {
        Group = "example/deploying",
        Scopes = 
        {
            "read_repository",
        },
    });
}

}

DeployTokenArgs

DeployTokenState

GetGroup

GetGroupArgs

GetGroupResult

GetProject

GetProjectArgs

GetProjectResult

GetProjects

GetProjectsArgs

GetProjectsResult

GetUser

GetUserArgs

GetUserResult

GetUsers

GetUsersArgs

GetUsersResult

Group

GroupArgs

GroupCluster

This resource allows you to create and manage group clusters for your GitLab groups. For further information on clusters, consult the gitlab documentation.

GroupClusterArgs

GroupClusterState

GroupLabel

This resource allows you to create and manage labels for your GitLab groups. For further information on labels, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var fixme = new GitLab.GroupLabel("fixme", new GitLab.GroupLabelArgs
    {
        Color = "#ffcc00",
        Description = "issue with failing tests",
        Group = "example",
    });
}

}

GroupLabelArgs

GroupLabelState

GroupLdapLink

This resource allows you to add an LDAP link to an existing GitLab group.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var test = new GitLab.GroupLdapLink("test", new GitLab.GroupLdapLinkArgs
    {
        AccessLevel = "developer",
        Cn = "testuser",
        GroupId = "12345",
        LdapProvider = "ldapmain",
    });
}

}

GroupLdapLinkArgs

GroupLdapLinkState

GroupMembership

This resource allows you to add a user to an existing group.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var test = new GitLab.GroupMembership("test", new GitLab.GroupMembershipArgs
    {
        AccessLevel = "guest",
        ExpiresAt = "2020-12-31",
        GroupId = "12345",
        UserId = 1337,
    });
}

}

GroupMembershipArgs

GroupMembershipState

GroupState

GroupVariable

This resource allows you to create and manage CI/CD variables for your GitLab groups. For further information on variables, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.GroupVariable("example", new GitLab.GroupVariableArgs
    {
        Group = "12345",
        Key = "group_variable_key",
        Masked = false,
        Protected = false,
        Value = "group_variable_value",
    });
}

}

GroupVariableArgs

GroupVariableState

Label

This resource allows you to create and manage labels for your GitLab projects. For further information on labels, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var fixme = new GitLab.Label("fixme", new GitLab.LabelArgs
    {
        Color = "#ffcc00",
        Description = "issue with failing tests",
        Project = "example",
    });
}

}

LabelArgs

LabelState

PipelineSchedule

This resource allows you to create and manage pipeline schedules. For further information on clusters, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.PipelineSchedule("example", new GitLab.PipelineScheduleArgs
    {
        Cron = "0 1 * * *",
        Description = "Used to schedule builds",
        Project = "12345",
        Ref = "master",
    });
}

}

PipelineScheduleArgs

PipelineScheduleState

PipelineScheduleVariable

This resource allows you to create and manage variables for pipeline schedules.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var examplePipelineSchedule = new GitLab.PipelineSchedule("examplePipelineSchedule", new GitLab.PipelineScheduleArgs
    {
        Project = "12345",
        Description = "Used to schedule builds",
        Ref = "master",
        Cron = "0 1 * * *",
    });
    var examplePipelineScheduleVariable = new GitLab.PipelineScheduleVariable("examplePipelineScheduleVariable", new GitLab.PipelineScheduleVariableArgs
    {
        Project = gitlab_pipeline_schedule.Project,
        PipelineScheduleId = gitlab_pipeline_schedule.Id,
        Key = "EXAMPLE_KEY",
        Value = "example",
    });
}

}

PipelineScheduleVariableArgs

PipelineScheduleVariableState

PipelineTrigger

This resource allows you to create and manage pipeline triggers

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.PipelineTrigger("example", new GitLab.PipelineTriggerArgs
    {
        Description = "Used to trigger builds",
        Project = "12345",
    });
}

}

PipelineTriggerArgs

PipelineTriggerState

Project

ProjectArgs

ProjectCluster

This resource allows you to create and manage project clusters for your GitLab projects. For further information on clusters, consult the gitlab documentation.

ProjectClusterArgs

ProjectClusterState

ProjectHook

This resource allows you to create and manage hooks for your GitLab projects. For further information on hooks, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.ProjectHook("example", new GitLab.ProjectHookArgs
    {
        MergeRequestsEvents = true,
        Project = "example/hooked",
        Url = "https://example.com/hook/example",
    });
}

}

ProjectHookArgs

ProjectHookState

ProjectMembership

This resource allows you to add a current user to an existing project with a set access level.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var test = new GitLab.ProjectMembership("test", new GitLab.ProjectMembershipArgs
    {
        AccessLevel = "guest",
        ProjectId = "12345",
        UserId = 1337,
    });
}

}

ProjectMembershipArgs

ProjectMembershipState

ProjectPushRules

This resource allows you to create and manage push rules for your GitLab projects. For further information on push rules, consult the gitlab documentation.

ProjectPushRulesArgs

ProjectPushRulesState

ProjectShareGroup

This resource allows you to share a project with a group

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var test = new GitLab.ProjectShareGroup("test", new GitLab.ProjectShareGroupArgs
    {
        AccessLevel = "guest",
        GroupId = 1337,
        ProjectId = "12345",
    });
}

}

ProjectShareGroupArgs

ProjectShareGroupState

ProjectState

ProjectVariable

This resource allows you to create and manage CI/CD variables for your GitLab projects. For further information on variables, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var example = new GitLab.ProjectVariable("example", new GitLab.ProjectVariableArgs
    {
        Key = "project_variable_key",
        Project = "12345",
        Protected = false,
        Value = "project_variable_value",
    });
}

}

ProjectVariableArgs

ProjectVariableState

Provider

The provider type for the gitlab package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

ProviderArgs

ServiceJira

This resource allows you to manage Jira integration.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var awesomeProject = new GitLab.Project("awesomeProject", new GitLab.ProjectArgs
    {
        Description = "My awesome project.",
        VisibilityLevel = "public",
    });
    var jira = new GitLab.ServiceJira("jira", new GitLab.ServiceJiraArgs
    {
        Password = "mypass",
        Project = awesomeProject.Id,
        Url = "https://jira.example.com",
        Username = "user",
    });
}

}

ServiceJiraArgs

ServiceJiraState

ServiceSlack

This resource allows you to manage Slack notifications integration.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var awesomeProject = new GitLab.Project("awesomeProject", new GitLab.ProjectArgs
    {
        Description = "My awesome project.",
        VisibilityLevel = "public",
    });
    var slack = new GitLab.ServiceSlack("slack", new GitLab.ServiceSlackArgs
    {
        Project = awesomeProject.Id,
        PushChannel = "push_chan",
        PushEvents = true,
        Username = "myuser",
        Webhook = "https://webhook.com",
    });
}

}

ServiceSlackArgs

ServiceSlackState

TagProtection

This resource allows you to protect a specific tag or wildcard by an access level so that the user with less access level cannot Create the tags.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
public MyStack()
{
    var tagProtect = new GitLab.TagProtection("tagProtect", new GitLab.TagProtectionArgs
    {
        CreateAccessLevel = "developer",
        Project = "12345",
        Tag = "TagProtected",
    });
}

}

TagProtectionArgs

TagProtectionState

User

UserArgs

UserState

Back to top Copyright 2016-2020, Pulumi Corporation.