1. Packages
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. GroupMember
Viewing docs for Databricks v1.91.1
published on Friday, May 1, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v1.91.1
published on Friday, May 1, 2026 by Pulumi

    This resource allows you to attach users, service_principal, and groups as group members.

    This resource can be used with an account or workspace-level provider.

    To attach members to groups in the Databricks account, the provider must be configured with host = "https://accounts.cloud.databricks.com" on AWS deployments or host = "https://accounts.azuredatabricks.net" and authenticate using AAD tokens on Azure deployments

    Example Usage

    After the following example, Bradley would have direct membership in group B and transitive membership in group A.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const a = new databricks.Group("a", {displayName: "A"});
    const b = new databricks.Group("b", {displayName: "B"});
    const ab = new databricks.GroupMember("ab", {
        groupId: a.id,
        memberId: b.id,
    });
    const bradley = new databricks.User("bradley", {userName: "bradley@example.com"});
    const bb = new databricks.GroupMember("bb", {
        groupId: b.id,
        memberId: bradley.id,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    a = databricks.Group("a", display_name="A")
    b = databricks.Group("b", display_name="B")
    ab = databricks.GroupMember("ab",
        group_id=a.id,
        member_id=b.id)
    bradley = databricks.User("bradley", user_name="bradley@example.com")
    bb = databricks.GroupMember("bb",
        group_id=b.id,
        member_id=bradley.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		a, err := databricks.NewGroup(ctx, "a", &databricks.GroupArgs{
    			DisplayName: pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		b, err := databricks.NewGroup(ctx, "b", &databricks.GroupArgs{
    			DisplayName: pulumi.String("B"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewGroupMember(ctx, "ab", &databricks.GroupMemberArgs{
    			GroupId:  a.ID(),
    			MemberId: b.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		bradley, err := databricks.NewUser(ctx, "bradley", &databricks.UserArgs{
    			UserName: pulumi.String("bradley@example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewGroupMember(ctx, "bb", &databricks.GroupMemberArgs{
    			GroupId:  b.ID(),
    			MemberId: bradley.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var a = new Databricks.Index.Group("a", new()
        {
            DisplayName = "A",
        });
    
        var b = new Databricks.Index.Group("b", new()
        {
            DisplayName = "B",
        });
    
        var ab = new Databricks.Index.GroupMember("ab", new()
        {
            GroupId = a.Id,
            MemberId = b.Id,
        });
    
        var bradley = new Databricks.Index.User("bradley", new()
        {
            UserName = "bradley@example.com",
        });
    
        var bb = new Databricks.Index.GroupMember("bb", new()
        {
            GroupId = b.Id,
            MemberId = bradley.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.Group;
    import com.pulumi.databricks.GroupArgs;
    import com.pulumi.databricks.GroupMember;
    import com.pulumi.databricks.GroupMemberArgs;
    import com.pulumi.databricks.User;
    import com.pulumi.databricks.UserArgs;
    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 a = new Group("a", GroupArgs.builder()
                .displayName("A")
                .build());
    
            var b = new Group("b", GroupArgs.builder()
                .displayName("B")
                .build());
    
            var ab = new GroupMember("ab", GroupMemberArgs.builder()
                .groupId(a.id())
                .memberId(b.id())
                .build());
    
            var bradley = new User("bradley", UserArgs.builder()
                .userName("bradley@example.com")
                .build());
    
            var bb = new GroupMember("bb", GroupMemberArgs.builder()
                .groupId(b.id())
                .memberId(bradley.id())
                .build());
    
        }
    }
    
    resources:
      a:
        type: databricks:Group
        properties:
          displayName: A
      b:
        type: databricks:Group
        properties:
          displayName: B
      ab:
        type: databricks:GroupMember
        properties:
          groupId: ${a.id}
          memberId: ${b.id}
      bradley:
        type: databricks:User
        properties:
          userName: bradley@example.com
      bb:
        type: databricks:GroupMember
        properties:
          groupId: ${b.id}
          memberId: ${bradley.id}
    

    The following resources are often used in the same context:

    • End to end workspace management guide.
    • databricks.Group to manage Account-level or Workspace-level groups.
    • databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles.
    • databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
    • databricks.IpAccessList to allow access from predefined IP ranges.
    • databricks.ServicePrincipal to grant access to a workspace to an automation tool or application.
    • databricks.User to manage users, that could be added to databricks.Group within the workspace.
    • databricks.User data to retrieve information about databricks_user.
    • databricks.UserInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_user.

    Create GroupMember Resource

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

    Constructor syntax

    new GroupMember(name: string, args: GroupMemberArgs, opts?: CustomResourceOptions);
    @overload
    def GroupMember(resource_name: str,
                    args: GroupMemberArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def GroupMember(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    group_id: Optional[str] = None,
                    member_id: Optional[str] = None,
                    api: Optional[str] = None,
                    provider_config: Optional[GroupMemberProviderConfigArgs] = None)
    func NewGroupMember(ctx *Context, name string, args GroupMemberArgs, opts ...ResourceOption) (*GroupMember, error)
    public GroupMember(string name, GroupMemberArgs args, CustomResourceOptions? opts = null)
    public GroupMember(String name, GroupMemberArgs args)
    public GroupMember(String name, GroupMemberArgs args, CustomResourceOptions options)
    
    type: databricks:GroupMember
    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 GroupMemberArgs
    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 GroupMemberArgs
    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 GroupMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupMemberArgs
    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 groupMemberResource = new Databricks.GroupMember("groupMemberResource", new()
    {
        GroupId = "string",
        MemberId = "string",
        Api = "string",
        ProviderConfig = new Databricks.Inputs.GroupMemberProviderConfigArgs
        {
            WorkspaceId = "string",
        },
    });
    
    example, err := databricks.NewGroupMember(ctx, "groupMemberResource", &databricks.GroupMemberArgs{
    	GroupId:  pulumi.String("string"),
    	MemberId: pulumi.String("string"),
    	Api:      pulumi.String("string"),
    	ProviderConfig: &databricks.GroupMemberProviderConfigArgs{
    		WorkspaceId: pulumi.String("string"),
    	},
    })
    
    var groupMemberResource = new GroupMember("groupMemberResource", GroupMemberArgs.builder()
        .groupId("string")
        .memberId("string")
        .api("string")
        .providerConfig(GroupMemberProviderConfigArgs.builder()
            .workspaceId("string")
            .build())
        .build());
    
    group_member_resource = databricks.GroupMember("groupMemberResource",
        group_id="string",
        member_id="string",
        api="string",
        provider_config={
            "workspace_id": "string",
        })
    
    const groupMemberResource = new databricks.GroupMember("groupMemberResource", {
        groupId: "string",
        memberId: "string",
        api: "string",
        providerConfig: {
            workspaceId: "string",
        },
    });
    
    type: databricks:GroupMember
    properties:
        api: string
        groupId: string
        memberId: string
        providerConfig:
            workspaceId: string
    

    GroupMember 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 GroupMember resource accepts the following input properties:

    GroupId string
    This is the id attribute (SCIM ID) of the group resource.
    MemberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    Api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    ProviderConfig GroupMemberProviderConfig
    GroupId string
    This is the id attribute (SCIM ID) of the group resource.
    MemberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    Api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    ProviderConfig GroupMemberProviderConfigArgs
    groupId String
    This is the id attribute (SCIM ID) of the group resource.
    memberId String
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    api String
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    providerConfig GroupMemberProviderConfig
    groupId string
    This is the id attribute (SCIM ID) of the group resource.
    memberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    providerConfig GroupMemberProviderConfig
    group_id str
    This is the id attribute (SCIM ID) of the group resource.
    member_id str
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    api str
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    provider_config GroupMemberProviderConfigArgs
    groupId String
    This is the id attribute (SCIM ID) of the group resource.
    memberId String
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    api String
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    providerConfig Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GroupMember 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 GroupMember Resource

    Get an existing GroupMember 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?: GroupMemberState, opts?: CustomResourceOptions): GroupMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api: Optional[str] = None,
            group_id: Optional[str] = None,
            member_id: Optional[str] = None,
            provider_config: Optional[GroupMemberProviderConfigArgs] = None) -> GroupMember
    func GetGroupMember(ctx *Context, name string, id IDInput, state *GroupMemberState, opts ...ResourceOption) (*GroupMember, error)
    public static GroupMember Get(string name, Input<string> id, GroupMemberState? state, CustomResourceOptions? opts = null)
    public static GroupMember get(String name, Output<String> id, GroupMemberState state, CustomResourceOptions options)
    resources:  _:    type: databricks:GroupMember    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:
    Api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    GroupId string
    This is the id attribute (SCIM ID) of the group resource.
    MemberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    ProviderConfig GroupMemberProviderConfig
    Api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    GroupId string
    This is the id attribute (SCIM ID) of the group resource.
    MemberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    ProviderConfig GroupMemberProviderConfigArgs
    api String
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    groupId String
    This is the id attribute (SCIM ID) of the group resource.
    memberId String
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    providerConfig GroupMemberProviderConfig
    api string
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    groupId string
    This is the id attribute (SCIM ID) of the group resource.
    memberId string
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    providerConfig GroupMemberProviderConfig
    api str
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    group_id str
    This is the id attribute (SCIM ID) of the group resource.
    member_id str
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    provider_config GroupMemberProviderConfigArgs
    api String
    Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.
    groupId String
    This is the id attribute (SCIM ID) of the group resource.
    memberId String
    This is the id attribute (SCIM ID) of the group, service principal, or user.
    providerConfig Property Map

    Supporting Types

    GroupMemberProviderConfig, GroupMemberProviderConfigArgs

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v1.91.1
    published on Friday, May 1, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.