1. Packages
  2. Bitbucket Provider
  3. API Docs
  4. Group
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

bitbucket.Group

Explore with Pulumi AI

bitbucket logo
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

    Provides a Bitbucket group resource.

    This allows you to manage your groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitbucket from "@pulumi/bitbucket";
    
    const testWorkspace = bitbucket.getWorkspace({
        workspace: "example",
    });
    const testGroup = new bitbucket.Group("testGroup", {
        workspace: testWorkspace.then(testWorkspace => testWorkspace.id),
        autoAdd: true,
        permission: "read",
    });
    
    import pulumi
    import pulumi_bitbucket as bitbucket
    
    test_workspace = bitbucket.get_workspace(workspace="example")
    test_group = bitbucket.Group("testGroup",
        workspace=test_workspace.id,
        auto_add=True,
        permission="read")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testWorkspace, err := bitbucket.GetWorkspace(ctx, &bitbucket.GetWorkspaceArgs{
    			Workspace: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = bitbucket.NewGroup(ctx, "testGroup", &bitbucket.GroupArgs{
    			Workspace:  pulumi.String(testWorkspace.Id),
    			AutoAdd:    pulumi.Bool(true),
    			Permission: pulumi.String("read"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitbucket = Pulumi.Bitbucket;
    
    return await Deployment.RunAsync(() => 
    {
        var testWorkspace = Bitbucket.GetWorkspace.Invoke(new()
        {
            Workspace = "example",
        });
    
        var testGroup = new Bitbucket.Group("testGroup", new()
        {
            Workspace = testWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
            AutoAdd = true,
            Permission = "read",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.bitbucket.BitbucketFunctions;
    import com.pulumi.bitbucket.inputs.GetWorkspaceArgs;
    import com.pulumi.bitbucket.Group;
    import com.pulumi.bitbucket.GroupArgs;
    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) {
            final var testWorkspace = BitbucketFunctions.getWorkspace(GetWorkspaceArgs.builder()
                .workspace("example")
                .build());
    
            var testGroup = new Group("testGroup", GroupArgs.builder()
                .workspace(testWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .autoAdd(true)
                .permission("read")
                .build());
    
        }
    }
    
    resources:
      testGroup:
        type: bitbucket:Group
        properties:
          workspace: ${testWorkspace.id}
          autoAdd: true
          permission: read
    variables:
      testWorkspace:
        fn::invoke:
          function: bitbucket:getWorkspace
          arguments:
            workspace: example
    

    Create Group Resource

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

    Constructor syntax

    new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
    @overload
    def Group(resource_name: str,
              args: GroupArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Group(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              workspace: Optional[str] = None,
              auto_add: Optional[bool] = None,
              email_forwarding_disabled: Optional[bool] = None,
              group_id: Optional[str] = None,
              name: Optional[str] = None,
              permission: Optional[str] = None)
    func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
    public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
    public Group(String name, GroupArgs args)
    public Group(String name, GroupArgs args, CustomResourceOptions options)
    
    type: bitbucket:Group
    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 GroupArgs
    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 GroupArgs
    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 GroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var groupResource = new Bitbucket.Group("groupResource", new()
    {
        Workspace = "string",
        AutoAdd = false,
        EmailForwardingDisabled = false,
        GroupId = "string",
        Name = "string",
        Permission = "string",
    });
    
    example, err := bitbucket.NewGroup(ctx, "groupResource", &bitbucket.GroupArgs{
    	Workspace:               pulumi.String("string"),
    	AutoAdd:                 pulumi.Bool(false),
    	EmailForwardingDisabled: pulumi.Bool(false),
    	GroupId:                 pulumi.String("string"),
    	Name:                    pulumi.String("string"),
    	Permission:              pulumi.String("string"),
    })
    
    var groupResource = new Group("groupResource", GroupArgs.builder()
        .workspace("string")
        .autoAdd(false)
        .emailForwardingDisabled(false)
        .groupId("string")
        .name("string")
        .permission("string")
        .build());
    
    group_resource = bitbucket.Group("groupResource",
        workspace="string",
        auto_add=False,
        email_forwarding_disabled=False,
        group_id="string",
        name="string",
        permission="string")
    
    const groupResource = new bitbucket.Group("groupResource", {
        workspace: "string",
        autoAdd: false,
        emailForwardingDisabled: false,
        groupId: "string",
        name: "string",
        permission: "string",
    });
    
    type: bitbucket:Group
    properties:
        autoAdd: false
        emailForwardingDisabled: false
        groupId: string
        name: string
        permission: string
        workspace: string
    

    Group Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Group resource accepts the following input properties:

    Workspace string
    The workspace of this repository.
    AutoAdd bool
    Whether to automatically add users the group
    EmailForwardingDisabled bool
    Whether to disable email forwarding for group.
    GroupId string
    Name string
    The name of the group.
    Permission string
    One of read, write, and admin.
    Workspace string
    The workspace of this repository.
    AutoAdd bool
    Whether to automatically add users the group
    EmailForwardingDisabled bool
    Whether to disable email forwarding for group.
    GroupId string
    Name string
    The name of the group.
    Permission string
    One of read, write, and admin.
    workspace String
    The workspace of this repository.
    autoAdd Boolean
    Whether to automatically add users the group
    emailForwardingDisabled Boolean
    Whether to disable email forwarding for group.
    groupId String
    name String
    The name of the group.
    permission String
    One of read, write, and admin.
    workspace string
    The workspace of this repository.
    autoAdd boolean
    Whether to automatically add users the group
    emailForwardingDisabled boolean
    Whether to disable email forwarding for group.
    groupId string
    name string
    The name of the group.
    permission string
    One of read, write, and admin.
    workspace str
    The workspace of this repository.
    auto_add bool
    Whether to automatically add users the group
    email_forwarding_disabled bool
    Whether to disable email forwarding for group.
    group_id str
    name str
    The name of the group.
    permission str
    One of read, write, and admin.
    workspace String
    The workspace of this repository.
    autoAdd Boolean
    Whether to automatically add users the group
    emailForwardingDisabled Boolean
    Whether to disable email forwarding for group.
    groupId String
    name String
    The name of the group.
    permission String
    One of read, write, and admin.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Slug string
    The groups slug.
    Id string
    The provider-assigned unique ID for this managed resource.
    Slug string
    The groups slug.
    id String
    The provider-assigned unique ID for this managed resource.
    slug String
    The groups slug.
    id string
    The provider-assigned unique ID for this managed resource.
    slug string
    The groups slug.
    id str
    The provider-assigned unique ID for this managed resource.
    slug str
    The groups slug.
    id String
    The provider-assigned unique ID for this managed resource.
    slug String
    The groups slug.

    Look up Existing Group Resource

    Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_add: Optional[bool] = None,
            email_forwarding_disabled: Optional[bool] = None,
            group_id: Optional[str] = None,
            name: Optional[str] = None,
            permission: Optional[str] = None,
            slug: Optional[str] = None,
            workspace: Optional[str] = None) -> Group
    func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
    public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
    public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
    resources:  _:    type: bitbucket:Group    get:      id: ${id}
    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:
    AutoAdd bool
    Whether to automatically add users the group
    EmailForwardingDisabled bool
    Whether to disable email forwarding for group.
    GroupId string
    Name string
    The name of the group.
    Permission string
    One of read, write, and admin.
    Slug string
    The groups slug.
    Workspace string
    The workspace of this repository.
    AutoAdd bool
    Whether to automatically add users the group
    EmailForwardingDisabled bool
    Whether to disable email forwarding for group.
    GroupId string
    Name string
    The name of the group.
    Permission string
    One of read, write, and admin.
    Slug string
    The groups slug.
    Workspace string
    The workspace of this repository.
    autoAdd Boolean
    Whether to automatically add users the group
    emailForwardingDisabled Boolean
    Whether to disable email forwarding for group.
    groupId String
    name String
    The name of the group.
    permission String
    One of read, write, and admin.
    slug String
    The groups slug.
    workspace String
    The workspace of this repository.
    autoAdd boolean
    Whether to automatically add users the group
    emailForwardingDisabled boolean
    Whether to disable email forwarding for group.
    groupId string
    name string
    The name of the group.
    permission string
    One of read, write, and admin.
    slug string
    The groups slug.
    workspace string
    The workspace of this repository.
    auto_add bool
    Whether to automatically add users the group
    email_forwarding_disabled bool
    Whether to disable email forwarding for group.
    group_id str
    name str
    The name of the group.
    permission str
    One of read, write, and admin.
    slug str
    The groups slug.
    workspace str
    The workspace of this repository.
    autoAdd Boolean
    Whether to automatically add users the group
    emailForwardingDisabled Boolean
    Whether to disable email forwarding for group.
    groupId String
    name String
    The name of the group.
    permission String
    One of read, write, and admin.
    slug String
    The groups slug.
    workspace String
    The workspace of this repository.

    Import

    Groups can be imported using their workspace/group-slug ID, e.g.

    $ pulumi import bitbucket:index/group:Group group my-workspace/group-slug
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bitbucket drfaust92/terraform-provider-bitbucket
    License
    Notes
    This Pulumi package is based on the bitbucket Terraform Provider.
    bitbucket logo
    bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92