databricks.getGroup
Explore with Pulumi AI
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
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.
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:
- Display
Name string - Display name of the group. The group must exist before this resource can be planned.
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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.
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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
- 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.
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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.
- acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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[]
- 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.
- acl_
principal_ strid - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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]
- 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.
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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:
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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
- 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
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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
- acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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[]
- 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
- acl_
principal_ strid - 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]
- 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
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
groups/Some Group
. - 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>
- 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.