1. Packages
  2. Databricks
  3. API Docs
  4. getGroup
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

databricks.getGroup

Explore with Pulumi AI

databricks logo
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Note If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.

    Retrieves information about databricks.Group members, entitlements and instance profiles.

    Example Usage

    Adding user to administrative group

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const admins = databricks.getGroup({
        displayName: "admins",
    });
    const me = new databricks.User("me", {userName: "me@example.com"});
    const myMemberA = new databricks.GroupMember("my_member_a", {
        groupId: admins.then(admins => admins.id),
        memberId: me.id,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    admins = databricks.get_group(display_name="admins")
    me = databricks.User("me", user_name="me@example.com")
    my_member_a = databricks.GroupMember("my_member_a",
        group_id=admins.id,
        member_id=me.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 {
    		admins, err := databricks.LookupGroup(ctx, &databricks.LookupGroupArgs{
    			DisplayName: "admins",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		me, err := databricks.NewUser(ctx, "me", &databricks.UserArgs{
    			UserName: pulumi.String("me@example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewGroupMember(ctx, "my_member_a", &databricks.GroupMemberArgs{
    			GroupId:  pulumi.String(admins.Id),
    			MemberId: me.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 admins = Databricks.GetGroup.Invoke(new()
        {
            DisplayName = "admins",
        });
    
        var me = new Databricks.User("me", new()
        {
            UserName = "me@example.com",
        });
    
        var myMemberA = new Databricks.GroupMember("my_member_a", new()
        {
            GroupId = admins.Apply(getGroupResult => getGroupResult.Id),
            MemberId = me.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetGroupArgs;
    import com.pulumi.databricks.User;
    import com.pulumi.databricks.UserArgs;
    import com.pulumi.databricks.GroupMember;
    import com.pulumi.databricks.GroupMemberArgs;
    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 admins = DatabricksFunctions.getGroup(GetGroupArgs.builder()
                .displayName("admins")
                .build());
    
            var me = new User("me", UserArgs.builder()
                .userName("me@example.com")
                .build());
    
            var myMemberA = new GroupMember("myMemberA", GroupMemberArgs.builder()
                .groupId(admins.applyValue(getGroupResult -> getGroupResult.id()))
                .memberId(me.id())
                .build());
    
        }
    }
    
    resources:
      me:
        type: databricks:User
        properties:
          userName: me@example.com
      myMemberA:
        type: databricks:GroupMember
        name: my_member_a
        properties:
          groupId: ${admins.id}
          memberId: ${me.id}
    variables:
      admins:
        fn::invoke:
          Function: databricks:getGroup
          Arguments:
            displayName: admins
    

    The following resources are used in the same context:

    • End to end workspace management guide
    • databricks.Cluster to create Databricks Clusters.
    • databricks.Directory to manage directories in Databricks Workpace.
    • databricks.GroupMember to attach users and groups as group members.
    • databricks.Permissions to manage access control in Databricks workspace.
    • databricks.User to manage users, that could be added to databricks.Group within the workspace.

    Using getGroup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
    function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
    def get_group(acl_principal_id: Optional[str] = None,
                  allow_cluster_create: Optional[bool] = None,
                  allow_instance_pool_create: Optional[bool] = None,
                  child_groups: Optional[Sequence[str]] = None,
                  databricks_sql_access: Optional[bool] = None,
                  display_name: Optional[str] = None,
                  external_id: Optional[str] = None,
                  groups: Optional[Sequence[str]] = None,
                  instance_profiles: Optional[Sequence[str]] = None,
                  members: Optional[Sequence[str]] = None,
                  recursive: Optional[bool] = None,
                  service_principals: Optional[Sequence[str]] = None,
                  users: Optional[Sequence[str]] = None,
                  workspace_access: Optional[bool] = None,
                  opts: Optional[InvokeOptions] = None) -> GetGroupResult
    def get_group_output(acl_principal_id: Optional[pulumi.Input[str]] = None,
                  allow_cluster_create: Optional[pulumi.Input[bool]] = None,
                  allow_instance_pool_create: Optional[pulumi.Input[bool]] = None,
                  child_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  databricks_sql_access: Optional[pulumi.Input[bool]] = None,
                  display_name: Optional[pulumi.Input[str]] = None,
                  external_id: Optional[pulumi.Input[str]] = None,
                  groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  instance_profiles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  members: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  recursive: Optional[pulumi.Input[bool]] = None,
                  service_principals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  workspace_access: Optional[pulumi.Input[bool]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
    func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
    func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput

    > Note: This function is named LookupGroup in the Go SDK.

    public static class GetGroup 
    {
        public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: databricks:index/getGroup:getGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayName string
    Display name of the group. The group must exist before this resource can be planned.
    AclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    AllowClusterCreate bool
    True if group members can create clusters
    AllowInstancePoolCreate bool
    True if group members can create instance pools
    ChildGroups List<string>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    DatabricksSqlAccess bool
    ExternalId string
    ID of the group in an external identity provider.
    Groups List<string>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    InstanceProfiles List<string>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    Members List<string>

    Deprecated: Please use users, service_principals, and child_groups instead

    Recursive bool
    Collect information for all nested groups. Defaults to true.
    ServicePrincipals List<string>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    Users List<string>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    WorkspaceAccess bool
    DisplayName string
    Display name of the group. The group must exist before this resource can be planned.
    AclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    AllowClusterCreate bool
    True if group members can create clusters
    AllowInstancePoolCreate bool
    True if group members can create instance pools
    ChildGroups []string
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    DatabricksSqlAccess bool
    ExternalId string
    ID of the group in an external identity provider.
    Groups []string
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    InstanceProfiles []string
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    Members []string

    Deprecated: Please use users, service_principals, and child_groups instead

    Recursive bool
    Collect information for all nested groups. Defaults to true.
    ServicePrincipals []string
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    Users []string
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    WorkspaceAccess bool
    displayName String
    Display name of the group. The group must exist before this resource can be planned.
    aclPrincipalId String
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    allowClusterCreate Boolean
    True if group members can create clusters
    allowInstancePoolCreate Boolean
    True if group members can create instance pools
    childGroups List<String>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    databricksSqlAccess Boolean
    externalId String
    ID of the group in an external identity provider.
    groups List<String>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    instanceProfiles List<String>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members List<String>

    Deprecated: Please use users, service_principals, and child_groups instead

    recursive Boolean
    Collect information for all nested groups. Defaults to true.
    servicePrincipals List<String>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users List<String>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    workspaceAccess Boolean
    displayName string
    Display name of the group. The group must exist before this resource can be planned.
    aclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    allowClusterCreate boolean
    True if group members can create clusters
    allowInstancePoolCreate boolean
    True if group members can create instance pools
    childGroups string[]
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    databricksSqlAccess boolean
    externalId string
    ID of the group in an external identity provider.
    groups string[]
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    instanceProfiles string[]
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members string[]

    Deprecated: Please use users, service_principals, and child_groups instead

    recursive boolean
    Collect information for all nested groups. Defaults to true.
    servicePrincipals string[]
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users string[]
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    workspaceAccess boolean
    display_name str
    Display name of the group. The group must exist before this resource can be planned.
    acl_principal_id str
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    allow_cluster_create bool
    True if group members can create clusters
    allow_instance_pool_create bool
    True if group members can create instance pools
    child_groups Sequence[str]
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    databricks_sql_access bool
    external_id str
    ID of the group in an external identity provider.
    groups Sequence[str]
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    instance_profiles Sequence[str]
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members Sequence[str]

    Deprecated: Please use users, service_principals, and child_groups instead

    recursive bool
    Collect information for all nested groups. Defaults to true.
    service_principals Sequence[str]
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users Sequence[str]
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    workspace_access bool
    displayName String
    Display name of the group. The group must exist before this resource can be planned.
    aclPrincipalId String
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    allowClusterCreate Boolean
    True if group members can create clusters
    allowInstancePoolCreate Boolean
    True if group members can create instance pools
    childGroups List<String>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    databricksSqlAccess Boolean
    externalId String
    ID of the group in an external identity provider.
    groups List<String>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    instanceProfiles List<String>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members List<String>

    Deprecated: Please use users, service_principals, and child_groups instead

    recursive Boolean
    Collect information for all nested groups. Defaults to true.
    servicePrincipals List<String>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users List<String>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    workspaceAccess Boolean

    getGroup Result

    The following output properties are available:

    AclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    ChildGroups List<string>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    DisplayName string
    ExternalId string
    ID of the group in an external identity provider.
    Groups List<string>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceProfiles List<string>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    Members List<string>

    Deprecated: Please use users, service_principals, and child_groups instead

    ServicePrincipals List<string>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    Users List<string>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    AllowClusterCreate bool
    True if group members can create clusters
    AllowInstancePoolCreate bool
    True if group members can create instance pools
    DatabricksSqlAccess bool
    Recursive bool
    WorkspaceAccess bool
    AclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    ChildGroups []string
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    DisplayName string
    ExternalId string
    ID of the group in an external identity provider.
    Groups []string
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceProfiles []string
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    Members []string

    Deprecated: Please use users, service_principals, and child_groups instead

    ServicePrincipals []string
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    Users []string
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    AllowClusterCreate bool
    True if group members can create clusters
    AllowInstancePoolCreate bool
    True if group members can create instance pools
    DatabricksSqlAccess bool
    Recursive bool
    WorkspaceAccess bool
    aclPrincipalId String
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    childGroups List<String>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    displayName String
    externalId String
    ID of the group in an external identity provider.
    groups List<String>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceProfiles List<String>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members List<String>

    Deprecated: Please use users, service_principals, and child_groups instead

    servicePrincipals List<String>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users List<String>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    allowClusterCreate Boolean
    True if group members can create clusters
    allowInstancePoolCreate Boolean
    True if group members can create instance pools
    databricksSqlAccess Boolean
    recursive Boolean
    workspaceAccess Boolean
    aclPrincipalId string
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    childGroups string[]
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    displayName string
    externalId string
    ID of the group in an external identity provider.
    groups string[]
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceProfiles string[]
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members string[]

    Deprecated: Please use users, service_principals, and child_groups instead

    servicePrincipals string[]
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users string[]
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    allowClusterCreate boolean
    True if group members can create clusters
    allowInstancePoolCreate boolean
    True if group members can create instance pools
    databricksSqlAccess boolean
    recursive boolean
    workspaceAccess boolean
    acl_principal_id str
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    child_groups Sequence[str]
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    display_name str
    external_id str
    ID of the group in an external identity provider.
    groups Sequence[str]
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_profiles Sequence[str]
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members Sequence[str]

    Deprecated: Please use users, service_principals, and child_groups instead

    service_principals Sequence[str]
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users Sequence[str]
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    allow_cluster_create bool
    True if group members can create clusters
    allow_instance_pool_create bool
    True if group members can create instance pools
    databricks_sql_access bool
    recursive bool
    workspace_access bool
    aclPrincipalId String
    identifier for use in databricks_access_control_rule_set, e.g. groups/Some Group.
    childGroups List<String>
    Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
    displayName String
    externalId String
    ID of the group in an external identity provider.
    groups List<String>
    Set of group identifiers, that can be modified with databricks.GroupMember resource.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceProfiles List<String>
    Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
    members List<String>

    Deprecated: Please use users, service_principals, and child_groups instead

    servicePrincipals List<String>
    Set of databricks.ServicePrincipal identifiers, that can be modified with databricks.GroupMember resource.
    users List<String>
    Set of databricks.User identifiers, that can be modified with databricks.GroupMember resource.
    allowClusterCreate Boolean
    True if group members can create clusters
    allowInstancePoolCreate Boolean
    True if group members can create instance pools
    databricksSqlAccess Boolean
    recursive Boolean
    workspaceAccess Boolean

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi