databricks.getGroup
Explore with Pulumi AI
Note If you have a fully automated setup with workspaces created by databricks_mws_workspaces, 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.
Related Resources
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.
Example Usage
Adding user to administrative group
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("myMemberA", new()
{
GroupId = admins.Apply(getGroupResult => getGroupResult.Id),
MemberId = 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, "myMemberA", &databricks.GroupMemberArgs{
GroupId: *pulumi.String(admins.Id),
MemberId: me.ID(),
})
if err != nil {
return err
}
return nil
})
}
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());
}
}
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("myMemberA",
group_id=admins.id,
member_id=me.id)
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("myMemberA", {
groupId: admins.then(admins => admins.id),
memberId: me.id,
});
resources:
me:
type: databricks:User
properties:
userName: me@example.com
myMemberA:
type: databricks:GroupMember
properties:
groupId: ${admins.id}
memberId: ${me.id}
variables:
admins:
fn::invoke:
Function: databricks:getGroup
Arguments:
displayName: admins
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(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(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:
- Display
Name string Display name of the group. The group must exist before this resource can be planned.
- Allow
Cluster boolCreate True if group members can create clusters
- Allow
Instance boolPool Create True if group members can create instance pools
- Child
Groups List<string> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- Databricks
Sql boolAccess - External
Id 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.
- Instance
Profiles List<string> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- Members List<string>
Please use
users
,service_principals
, andchild_groups
instead- Recursive bool
Collect information for all nested groups. Defaults to true.
- Service
Principals 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.
- Workspace
Access bool
- Display
Name string Display name of the group. The group must exist before this resource can be planned.
- Allow
Cluster boolCreate True if group members can create clusters
- Allow
Instance boolPool Create True if group members can create instance pools
- Child
Groups []string Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- Databricks
Sql boolAccess - External
Id string ID of the group in an external identity provider.
- Groups []string
Set of group identifiers, that can be modified with databricks.GroupMember resource.
- Instance
Profiles []string Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- Members []string
Please use
users
,service_principals
, andchild_groups
instead- Recursive bool
Collect information for all nested groups. Defaults to true.
- Service
Principals []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.
- Workspace
Access bool
- display
Name String Display name of the group. The group must exist before this resource can be planned.
- allow
Cluster BooleanCreate True if group members can create clusters
- allow
Instance BooleanPool Create True if group members can create instance pools
- child
Groups List<String> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- databricks
Sql BooleanAccess - external
Id 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.
- instance
Profiles List<String> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members List<String>
Please use
users
,service_principals
, andchild_groups
instead- recursive Boolean
Collect information for all nested groups. Defaults to true.
- service
Principals 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.
- workspace
Access Boolean
- display
Name string Display name of the group. The group must exist before this resource can be planned.
- allow
Cluster booleanCreate True if group members can create clusters
- allow
Instance booleanPool Create True if group members can create instance pools
- child
Groups string[] Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- databricks
Sql booleanAccess - external
Id string ID of the group in an external identity provider.
- groups string[]
Set of group identifiers, that can be modified with databricks.GroupMember resource.
- instance
Profiles string[] Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members string[]
Please use
users
,service_principals
, andchild_groups
instead- recursive boolean
Collect information for all nested groups. Defaults to true.
- service
Principals 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.
- workspace
Access boolean
- display_
name str Display name of the group. The group must exist before this resource can be planned.
- allow_
cluster_ boolcreate True if group members can create clusters
- allow_
instance_ boolpool_ create 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_ boolaccess - 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]
Please use
users
,service_principals
, andchild_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
- display
Name String Display name of the group. The group must exist before this resource can be planned.
- allow
Cluster BooleanCreate True if group members can create clusters
- allow
Instance BooleanPool Create True if group members can create instance pools
- child
Groups List<String> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- databricks
Sql BooleanAccess - external
Id 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.
- instance
Profiles List<String> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members List<String>
Please use
users
,service_principals
, andchild_groups
instead- recursive Boolean
Collect information for all nested groups. Defaults to true.
- service
Principals 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.
- workspace
Access Boolean
getGroup Result
The following output properties are available:
- Child
Groups List<string> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- Display
Name string - External
Id 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.
- Instance
Profiles List<string> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- Members List<string>
Please use
users
,service_principals
, andchild_groups
instead- Service
Principals 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.
- Allow
Cluster boolCreate True if group members can create clusters
- Allow
Instance boolPool Create True if group members can create instance pools
- Databricks
Sql boolAccess - Recursive bool
- Workspace
Access bool
- Child
Groups []string Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- Display
Name string - External
Id 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.
- Instance
Profiles []string Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- Members []string
Please use
users
,service_principals
, andchild_groups
instead- Service
Principals []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.
- Allow
Cluster boolCreate True if group members can create clusters
- Allow
Instance boolPool Create True if group members can create instance pools
- Databricks
Sql boolAccess - Recursive bool
- Workspace
Access bool
- child
Groups List<String> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- display
Name String - external
Id 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.
- instance
Profiles List<String> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members List<String>
Please use
users
,service_principals
, andchild_groups
instead- service
Principals 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.
- allow
Cluster BooleanCreate True if group members can create clusters
- allow
Instance BooleanPool Create True if group members can create instance pools
- databricks
Sql BooleanAccess - recursive Boolean
- workspace
Access Boolean
- child
Groups string[] Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- display
Name string - external
Id 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.
- instance
Profiles string[] Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members string[]
Please use
users
,service_principals
, andchild_groups
instead- service
Principals 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.
- allow
Cluster booleanCreate True if group members can create clusters
- allow
Instance booleanPool Create True if group members can create instance pools
- databricks
Sql booleanAccess - recursive boolean
- workspace
Access boolean
- 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]
Please use
users
,service_principals
, andchild_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_ boolcreate True if group members can create clusters
- allow_
instance_ boolpool_ create True if group members can create instance pools
- databricks_
sql_ boolaccess - recursive bool
- workspace_
access bool
- child
Groups List<String> Set of databricks.Group identifiers, that can be modified with databricks.GroupMember resource.
- display
Name String - external
Id 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.
- instance
Profiles List<String> Set of instance profile ARNs, that can be modified by databricks.GroupInstanceProfile resource.
- members List<String>
Please use
users
,service_principals
, andchild_groups
instead- service
Principals 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.
- allow
Cluster BooleanCreate True if group members can create clusters
- allow
Instance BooleanPool Create True if group members can create instance pools
- databricks
Sql BooleanAccess - recursive Boolean
- workspace
Access Boolean
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
databricks
Terraform Provider.