1. Packages
  2. GitLab
  3. API Docs
  4. GroupShareGroup
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.GroupShareGroup

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    The gitlab.GroupShareGroup resource allows to manage the lifecycle of 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: gitlab_group.foo.id,
        shareGroupId: gitlab_group.bar.id,
        groupAccess: "guest",
        expiresAt: "2099-01-01",
    });
    
    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")
    
    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 {
    		_, 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
    	})
    }
    
    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 = gitlab_group.Foo.Id,
            ShareGroupId = gitlab_group.Bar.Id,
            GroupAccess = "guest",
            ExpiresAt = "2099-01-01",
        });
    
    });
    
    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(gitlab_group.foo().id())
                .shareGroupId(gitlab_group.bar().id())
                .groupAccess("guest")
                .expiresAt("2099-01-01")
                .build());
    
        }
    }
    
    resources:
      test:
        type: gitlab:GroupShareGroup
        properties:
          groupId: ${gitlab_group.foo.id}
          shareGroupId: ${gitlab_group.bar.id}
          groupAccess: guest
          expiresAt: 2099-01-01
    

    Create GroupShareGroup Resource

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

    Constructor syntax

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

    Parameters

    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.
    name String
    The unique name of the resource.
    args GroupShareGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var groupShareGroupResource = new GitLab.GroupShareGroup("groupShareGroupResource", new()
    {
        GroupAccess = "string",
        GroupId = "string",
        ShareGroupId = 0,
        ExpiresAt = "string",
    });
    
    example, err := gitlab.NewGroupShareGroup(ctx, "groupShareGroupResource", &gitlab.GroupShareGroupArgs{
    	GroupAccess:  pulumi.String("string"),
    	GroupId:      pulumi.String("string"),
    	ShareGroupId: pulumi.Int(0),
    	ExpiresAt:    pulumi.String("string"),
    })
    
    var groupShareGroupResource = new GroupShareGroup("groupShareGroupResource", GroupShareGroupArgs.builder()        
        .groupAccess("string")
        .groupId("string")
        .shareGroupId(0)
        .expiresAt("string")
        .build());
    
    group_share_group_resource = gitlab.GroupShareGroup("groupShareGroupResource",
        group_access="string",
        group_id="string",
        share_group_id=0,
        expires_at="string")
    
    const groupShareGroupResource = new gitlab.GroupShareGroup("groupShareGroupResource", {
        groupAccess: "string",
        groupId: "string",
        shareGroupId: 0,
        expiresAt: "string",
    });
    
    type: gitlab:GroupShareGroup
    properties:
        expiresAt: string
        groupAccess: string
        groupId: string
        shareGroupId: 0
    

    GroupShareGroup Resource Properties

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

    Inputs

    The GroupShareGroup resource accepts the following input properties:

    GroupAccess string
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    GroupId string
    The id of the main group to be shared.
    ShareGroupId int
    The id of the additional group with which the main group will be shared.
    ExpiresAt string
    Share expiration date. Format: YYYY-MM-DD
    GroupAccess string
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    GroupId string
    The id of the main group to be shared.
    ShareGroupId int
    The id of the additional group with which the main group will be shared.
    ExpiresAt string
    Share expiration date. Format: YYYY-MM-DD
    groupAccess String
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId String
    The id of the main group to be shared.
    shareGroupId Integer
    The id of the additional group with which the main group will be shared.
    expiresAt String
    Share expiration date. Format: YYYY-MM-DD
    groupAccess string
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId string
    The id of the main group to be shared.
    shareGroupId number
    The id of the additional group with which the main group will be shared.
    expiresAt string
    Share expiration date. Format: YYYY-MM-DD
    group_access str
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    group_id str
    The id of the main group to be shared.
    share_group_id int
    The id of the additional group with which the main group will be shared.
    expires_at str
    Share expiration date. Format: YYYY-MM-DD
    groupAccess String
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId String
    The id of the main group to be shared.
    shareGroupId Number
    The id of the additional group with which the main group will be shared.
    expiresAt String
    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 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 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)
    public static GroupShareGroup get(String name, Output<String> id, GroupShareGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    GroupId string
    The id of the main group to be shared.
    ShareGroupId int
    The id of the additional group with which the main group will be shared.
    ExpiresAt string
    Share expiration date. Format: YYYY-MM-DD
    GroupAccess string
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    GroupId string
    The id of the main group to be shared.
    ShareGroupId int
    The id of the additional group with which the main group will be shared.
    expiresAt String
    Share expiration date. Format: YYYY-MM-DD
    groupAccess String
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId String
    The id of the main group to be shared.
    shareGroupId Integer
    The id of the additional group with which the main group will be shared.
    expiresAt string
    Share expiration date. Format: YYYY-MM-DD
    groupAccess string
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId string
    The id of the main group to be shared.
    shareGroupId number
    The id of the additional group with which the main group will be shared.
    expires_at str
    Share expiration date. Format: YYYY-MM-DD
    group_access str
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    group_id str
    The id of the main group to be shared.
    share_group_id int
    The id of the additional group with which the main group will be shared.
    expiresAt String
    Share expiration date. Format: YYYY-MM-DD
    groupAccess String
    The access level to grant the group. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master
    groupId String
    The id of the main group to be shared.
    shareGroupId Number
    The id of the additional group with which the main group will be shared.

    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
    

    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.
    gitlab logo
    GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi