Group Share Group
The gitlab.GroupShareGroup
resource allows managing the lifecycle of a group shared with another group. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const test = new gitlab.GroupShareGroup("test", {
groupId: foo.id,
shareGroupId: bar.id,
groupAccess: "guest",
expiresAt: "2099-01-01",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
test = gitlab.GroupShareGroup("test",
group_id=foo["id"],
share_group_id=bar["id"],
group_access="guest",
expires_at="2099-01-01")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var test = new GitLab.GroupShareGroup("test", new()
{
GroupId = foo.Id,
ShareGroupId = bar.Id,
GroupAccess = "guest",
ExpiresAt = "2099-01-01",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewGroupShareGroup(ctx, "test", &gitlab.GroupShareGroupArgs{
GroupId: pulumi.Any(foo.Id),
ShareGroupId: pulumi.Any(bar.Id),
GroupAccess: pulumi.String("guest"),
ExpiresAt: pulumi.String("2099-01-01"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GroupShareGroup;
import com.pulumi.gitlab.GroupShareGroupArgs;
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 test = new GroupShareGroup("test", GroupShareGroupArgs.builder()
.groupId(foo.id())
.shareGroupId(bar.id())
.groupAccess("guest")
.expiresAt("2099-01-01")
.build());
}
}
Content copied to clipboard
resources:
test:
type: gitlab:GroupShareGroup
properties:
groupId: ${foo.id}
shareGroupId: ${bar.id}
groupAccess: guest
expiresAt: 2099-01-01
Content copied to clipboard
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_group_share_group
. For example: terraform import { to = gitlab_group_share_group.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: GitLab group shares can be imported using an id made up of mainGroupId:shareGroupId
, e.g.
$ pulumi import gitlab:index/groupShareGroup:GroupShareGroup test 12345:1337
Content copied to clipboard
Properties
Link copied to clipboard
The access level to grant the group. Valid values are: no one
, minimal
, guest
, reporter
, developer
, maintainer
, owner
Link copied to clipboard
The ID of a custom member role. Only available for Ultimate instances.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The id of the additional group with which the main group will be shared.