GroupArgs

data class GroupArgs(val autoDevopsEnabled: Output<Boolean>? = null, val avatar: Output<String>? = null, val avatarHash: Output<String>? = null, val defaultBranchProtection: Output<Int>? = null, val description: Output<String>? = null, val emailsDisabled: Output<Boolean>? = null, val emailsEnabled: Output<Boolean>? = null, val extraSharedRunnersMinutesLimit: Output<Int>? = null, val ipRestrictionRanges: Output<List<String>>? = null, val lfsEnabled: Output<Boolean>? = null, val membershipLock: Output<Boolean>? = null, val mentionsDisabled: Output<Boolean>? = null, val name: Output<String>? = null, val parentId: Output<Int>? = null, val path: Output<String>? = null, val preventForkingOutsideGroup: Output<Boolean>? = null, val projectCreationLevel: Output<String>? = null, val pushRules: Output<GroupPushRulesArgs>? = null, val requestAccessEnabled: Output<Boolean>? = null, val requireTwoFactorAuthentication: Output<Boolean>? = null, val shareWithGroupLock: Output<Boolean>? = null, val sharedRunnersMinutesLimit: Output<Int>? = null, val sharedRunnersSetting: Output<String>? = null, val subgroupCreationLevel: Output<String>? = null, val twoFactorGracePeriod: Output<Int>? = null, val visibilityLevel: Output<String>? = null, val wikiAccessLevel: Output<String>? = null) : ConvertibleToJava<GroupArgs>

The gitlab.Group resource allows to manage the lifecycle of a group.

On GitLab SaaS, you must use the GitLab UI to create groups without a parent group. You cannot use this provider nor the API to do this. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const exampleGroup = new gitlab.Group("exampleGroup", {
path: "example",
description: "An example group",
});
// Create a project in the example group
const exampleProject = new gitlab.Project("exampleProject", {
description: "An example project",
namespaceId: exampleGroup.id,
});
// Group with custom push rules
const example_two = new gitlab.Group("example-two", {
path: "example-two",
description: "An example group with push rules",
pushRules: {
authorEmailRegex: "@example\\.com$",
commitCommitterCheck: true,
memberCheck: true,
preventSecrets: true,
},
});
import pulumi
import pulumi_gitlab as gitlab
example_group = gitlab.Group("exampleGroup",
path="example",
description="An example group")
# Create a project in the example group
example_project = gitlab.Project("exampleProject",
description="An example project",
namespace_id=example_group.id)
# Group with custom push rules
example_two = gitlab.Group("example-two",
path="example-two",
description="An example group with push rules",
push_rules=gitlab.GroupPushRulesArgs(
author_email_regex="@example\\.com$",
commit_committer_check=True,
member_check=True,
prevent_secrets=True,
))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var exampleGroup = new GitLab.Group("exampleGroup", new()
{
Path = "example",
Description = "An example group",
});
// Create a project in the example group
var exampleProject = new GitLab.Project("exampleProject", new()
{
Description = "An example project",
NamespaceId = exampleGroup.Id,
});
// Group with custom push rules
var example_two = new GitLab.Group("example-two", new()
{
Path = "example-two",
Description = "An example group with push rules",
PushRules = new GitLab.Inputs.GroupPushRulesArgs
{
AuthorEmailRegex = "@example\\.com$",
CommitCommitterCheck = true,
MemberCheck = true,
PreventSecrets = true,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleGroup, err := gitlab.NewGroup(ctx, "exampleGroup", &gitlab.GroupArgs{
Path: pulumi.String("example"),
Description: pulumi.String("An example group"),
})
if err != nil {
return err
}
// Create a project in the example group
_, err = gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{
Description: pulumi.String("An example project"),
NamespaceId: exampleGroup.ID(),
})
if err != nil {
return err
}
// Group with custom push rules
_, err = gitlab.NewGroup(ctx, "example-two", &gitlab.GroupArgs{
Path: pulumi.String("example-two"),
Description: pulumi.String("An example group with push rules"),
PushRules: &gitlab.GroupPushRulesArgs{
AuthorEmailRegex: pulumi.String("@example\\.com$"),
CommitCommitterCheck: pulumi.Bool(true),
MemberCheck: pulumi.Bool(true),
PreventSecrets: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Group;
import com.pulumi.gitlab.GroupArgs;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.inputs.GroupPushRulesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.path("example")
.description("An example group")
.build());
// Create a project in the example group
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("An example project")
.namespaceId(exampleGroup.id())
.build());
// Group with custom push rules
var example_two = new Group("example-two", GroupArgs.builder()
.path("example-two")
.description("An example group with push rules")
.pushRules(GroupPushRulesArgs.builder()
.authorEmailRegex("@example\\.com$")
.commitCommitterCheck(true)
.memberCheck(true)
.preventSecrets(true)
.build())
.build());
}
}
resources:
exampleGroup:
type: gitlab:Group
properties:
path: example
description: An example group
# Create a project in the example group
exampleProject:
type: gitlab:Project
properties:
description: An example project
namespaceId: ${exampleGroup.id}
# Group with custom push rules
example-two:
type: gitlab:Group
properties:
path: example-two
description: An example group with push rules
pushRules:
authorEmailRegex: '@example\.com$'
commitCommitterCheck: true
memberCheck: true
preventSecrets: true

Import

$ pulumi import gitlab:index/group:Group You can import a group state using `<resource> <id>`. The

id can be whatever the details_of_a_group api takes for its :id value, so for example:

$ pulumi import gitlab:index/group:Group example example

Constructors

Link copied to clipboard
constructor(autoDevopsEnabled: Output<Boolean>? = null, avatar: Output<String>? = null, avatarHash: Output<String>? = null, defaultBranchProtection: Output<Int>? = null, description: Output<String>? = null, emailsDisabled: Output<Boolean>? = null, emailsEnabled: Output<Boolean>? = null, extraSharedRunnersMinutesLimit: Output<Int>? = null, ipRestrictionRanges: Output<List<String>>? = null, lfsEnabled: Output<Boolean>? = null, membershipLock: Output<Boolean>? = null, mentionsDisabled: Output<Boolean>? = null, name: Output<String>? = null, parentId: Output<Int>? = null, path: Output<String>? = null, preventForkingOutsideGroup: Output<Boolean>? = null, projectCreationLevel: Output<String>? = null, pushRules: Output<GroupPushRulesArgs>? = null, requestAccessEnabled: Output<Boolean>? = null, requireTwoFactorAuthentication: Output<Boolean>? = null, shareWithGroupLock: Output<Boolean>? = null, sharedRunnersMinutesLimit: Output<Int>? = null, sharedRunnersSetting: Output<String>? = null, subgroupCreationLevel: Output<String>? = null, twoFactorGracePeriod: Output<Int>? = null, visibilityLevel: Output<String>? = null, wikiAccessLevel: Output<String>? = null)

Properties

Link copied to clipboard
val autoDevopsEnabled: Output<Boolean>? = null

Default to Auto DevOps pipeline for all projects within this group.

Link copied to clipboard
val avatar: Output<String>? = null

A local path to the avatar image to upload. Note: not available for imported resources.

Link copied to clipboard
val avatarHash: Output<String>? = null

The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.

Link copied to clipboard
val defaultBranchProtection: Output<Int>? = null

See https://docs.gitlab.com/ee/api/groups.html#options-for-default*branch*protection. Valid values are: 0, 1, 2, 3, 4.

Link copied to clipboard
val description: Output<String>? = null

The group's description.

Link copied to clipboard
val emailsDisabled: Output<Boolean>? = null

Disable email notifications.

Link copied to clipboard
val emailsEnabled: Output<Boolean>? = null

Enable email notifications.

Link copied to clipboard
val extraSharedRunnersMinutesLimit: Output<Int>? = null

Can be set by administrators only. Additional CI/CD minutes for this group.

Link copied to clipboard
val ipRestrictionRanges: Output<List<String>>? = null

A list of IP addresses or subnet masks to restrict group access. Will be concatenated together into a comma separated string. Only allowed on top level groups.

Link copied to clipboard
val lfsEnabled: Output<Boolean>? = null

Enable/disable Large File Storage (LFS) for the projects in this group.

Link copied to clipboard
val membershipLock: Output<Boolean>? = null

Users cannot be added to projects in this group.

Link copied to clipboard
val mentionsDisabled: Output<Boolean>? = null

Disable the capability of a group from getting mentioned.

Link copied to clipboard
val name: Output<String>? = null

The name of the group.

Link copied to clipboard
val parentId: Output<Int>? = null

Id of the parent group (creates a nested group).

Link copied to clipboard
val path: Output<String>? = null

The path of the group.

Link copied to clipboard
val preventForkingOutsideGroup: Output<Boolean>? = null

Defaults to false. When enabled, users can not fork projects from this group to external namespaces.

Link copied to clipboard
val projectCreationLevel: Output<String>? = null

Determine if developers can create projects in the group. Valid values are: noone, maintainer, developer

Link copied to clipboard
val pushRules: Output<GroupPushRulesArgs>? = null

Push rules for the group.

Link copied to clipboard
val requestAccessEnabled: Output<Boolean>? = null

Allow users to request member access.

Link copied to clipboard

Require all users in this group to setup Two-factor authentication.

Link copied to clipboard
val sharedRunnersMinutesLimit: Output<Int>? = null

Can be set by administrators only. Maximum number of monthly CI/CD minutes for this group. Can be nil (default; inherit system default), 0 (unlimited), or 0.

Link copied to clipboard
val sharedRunnersSetting: Output<String>? = null

Enable or disable shared runners for a group’s subgroups and projects. Valid values are: enabled, disabled_and_overridable, disabled_and_unoverridable, disabled_with_override.

Link copied to clipboard
val shareWithGroupLock: Output<Boolean>? = null

Prevent sharing a project with another group within this group.

Link copied to clipboard
val subgroupCreationLevel: Output<String>? = null

Allowed to create subgroups. Valid values are: owner, maintainer.

Link copied to clipboard
val twoFactorGracePeriod: Output<Int>? = null

Defaults to 48. Time before Two-factor authentication is enforced (in hours).

Link copied to clipboard
val visibilityLevel: Output<String>? = null

The group's visibility. Can be private, internal, or public. Valid values are: private, internal, public.

Link copied to clipboard
val wikiAccessLevel: Output<String>? = null

The group's wiki access level. Only available on Premium and Ultimate plans. Valid values are disabled, private, enabled.

Functions

Link copied to clipboard
open override fun toJava(): GroupArgs