GroupShareGroup

# gitlab_group_share_group

This resource allows you to share a group with another group

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new GitLab.GroupShareGroup("test", new GitLab.GroupShareGroupArgs
        {
            GroupId = gitlab_group.Foo.Id,
            ShareGroupId = gitlab_group.Bar.Id,
            GroupAccess = "guest",
            ExpiresAt = "2099-01-01",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/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(gitlab_group.Foo.Id),
			ShareGroupId: pulumi.Any(gitlab_group.Bar.Id),
			GroupAccess:  pulumi.String("guest"),
			ExpiresAt:    pulumi.String("2099-01-01"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

test = gitlab.GroupShareGroup("test",
    group_id=gitlab_group["foo"]["id"],
    share_group_id=gitlab_group["bar"]["id"],
    group_access="guest",
    expires_at="2099-01-01")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const test = new gitlab.GroupShareGroup("test", {
    groupId: gitlab_group.foo.id,
    shareGroupId: gitlab_group.bar.id,
    groupAccess: "guest",
    expiresAt: "2099-01-01",
});

Create a GroupShareGroup Resource

new GroupShareGroup(name: string, args: GroupShareGroupArgs, opts?: CustomResourceOptions);
@overload
def GroupShareGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    expires_at: Optional[str] = None,
                    group_access: Optional[str] = None,
                    group_id: Optional[str] = None,
                    share_group_id: Optional[int] = None)
@overload
def GroupShareGroup(resource_name: str,
                    args: GroupShareGroupArgs,
                    opts: Optional[ResourceOptions] = None)
func NewGroupShareGroup(ctx *Context, name string, args GroupShareGroupArgs, opts ...ResourceOption) (*GroupShareGroup, error)
public GroupShareGroup(string name, GroupShareGroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args GroupShareGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args GroupShareGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GroupShareGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GroupShareGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GroupShareGroup Resource Properties

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

Inputs

The GroupShareGroup resource accepts the following input properties:

GroupAccess string
One of five levels of access to the group.
GroupId string
The id of the main group.
ShareGroupId int
The id of an additional group which will be shared with the main group.
ExpiresAt string
Share expiration date. Format: YYYY-MM-DD
GroupAccess string
One of five levels of access to the group.
GroupId string
The id of the main group.
ShareGroupId int
The id of an additional group which will be shared with the main group.
ExpiresAt string
Share expiration date. Format: YYYY-MM-DD
groupAccess string
One of five levels of access to the group.
groupId string
The id of the main group.
shareGroupId number
The id of an additional group which will be shared with the main group.
expiresAt string
Share expiration date. Format: YYYY-MM-DD
group_access str
One of five levels of access to the group.
group_id str
The id of the main group.
share_group_id int
The id of an additional group which will be shared with the main group.
expires_at str
Share expiration date. Format: YYYY-MM-DD

Outputs

All input properties are implicitly available as output properties. Additionally, the GroupShareGroup 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing GroupShareGroup Resource

Get an existing GroupShareGroup 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?: GroupShareGroupState, opts?: CustomResourceOptions): GroupShareGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        expires_at: Optional[str] = None,
        group_access: Optional[str] = None,
        group_id: Optional[str] = None,
        share_group_id: Optional[int] = None) -> GroupShareGroup
func GetGroupShareGroup(ctx *Context, name string, id IDInput, state *GroupShareGroupState, opts ...ResourceOption) (*GroupShareGroup, error)
public static GroupShareGroup Get(string name, Input<string> id, GroupShareGroupState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:

ExpiresAt string
Share expiration date. Format: YYYY-MM-DD
GroupAccess string
One of five levels of access to the group.
GroupId string
The id of the main group.
ShareGroupId int
The id of an additional group which will be shared with the main group.
ExpiresAt string
Share expiration date. Format: YYYY-MM-DD
GroupAccess string
One of five levels of access to the group.
GroupId string
The id of the main group.
ShareGroupId int
The id of an additional group which will be shared with the main group.
expiresAt string
Share expiration date. Format: YYYY-MM-DD
groupAccess string
One of five levels of access to the group.
groupId string
The id of the main group.
shareGroupId number
The id of an additional group which will be shared with the main group.
expires_at str
Share expiration date. Format: YYYY-MM-DD
group_access str
One of five levels of access to the group.
group_id str
The id of the main group.
share_group_id int
The id of an additional group which will be shared with the main group.

Import

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

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.