Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Retrieves information about databricks_user.
This data source can be used with an account or workspace-level provider.
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 = databricks.getUser({
userName: "me@example.com",
});
const myMemberA = new databricks.GroupMember("my_member_a", {
groupId: admins.then(admins => admins.id),
memberId: me.then(me => me.id),
});
import pulumi
import pulumi_databricks as databricks
admins = databricks.get_group(display_name="admins")
me = databricks.get_user(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.LookupUser(ctx, &databricks.LookupUserArgs{
UserName: pulumi.StringRef("me@example.com"),
}, nil)
if err != nil {
return err
}
_, err = databricks.NewGroupMember(ctx, "my_member_a", &databricks.GroupMemberArgs{
GroupId: pulumi.String(admins.Id),
MemberId: pulumi.String(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 = Databricks.GetUser.Invoke(new()
{
UserName = "me@example.com",
});
var myMemberA = new Databricks.GroupMember("my_member_a", new()
{
GroupId = admins.Apply(getGroupResult => getGroupResult.Id),
MemberId = me.Apply(getUserResult => getUserResult.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.inputs.GetUserArgs;
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());
final var me = DatabricksFunctions.getUser(GetUserArgs.builder()
.userName("me@example.com")
.build());
var myMemberA = new GroupMember("myMemberA", GroupMemberArgs.builder()
.groupId(admins.id())
.memberId(me.id())
.build());
}
}
resources:
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
me:
fn::invoke:
function: databricks:getUser
arguments:
userName: me@example.com
Related Resources
The following resources are used in the same context:
- End to end workspace management guide. - databricks.getCurrentUser data to retrieve information about databricks.User or databricks_service_principal, that is calling Databricks REST API. - 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.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. - databricks.UserInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_user.
Using getUser
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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>def get_user(provider_config: Optional[GetUserProviderConfig] = None,
user_id: Optional[str] = None,
user_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(provider_config: Optional[pulumi.Input[GetUserProviderConfigArgs]] = None,
user_id: Optional[pulumi.Input[str]] = None,
user_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput> Note: This function is named LookupUser in the Go SDK.
public static class GetUser
{
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getUser:getUser
arguments:
# arguments dictionaryThe following arguments are supported:
- Provider
Config GetUser Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- User
Id string - ID of the user.
- User
Name string - User name of the user. The user must exist before this resource can be planned.
- Provider
Config GetUser Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- User
Id string - ID of the user.
- User
Name string - User name of the user. The user must exist before this resource can be planned.
- provider
Config GetUser Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- user
Id String - ID of the user.
- user
Name String - User name of the user. The user must exist before this resource can be planned.
- provider
Config GetUser Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- user
Id string - ID of the user.
- user
Name string - User name of the user. The user must exist before this resource can be planned.
- provider_
config GetUser Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- user_
id str - ID of the user.
- user_
name str - User name of the user. The user must exist before this resource can be planned.
- provider
Config Property Map - Configure the provider for management through account provider. This block consists of the following fields:
- user
Id String - ID of the user.
- user
Name String - User name of the user. The user must exist before this resource can be planned.
getUser Result
The following output properties are available:
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - Active bool
- Whether the user is active.
- Alphanumeric string
- Alphanumeric representation of user local name. e.g.
mr_foo. - Application
Id string - Display
Name string - Display name of the user, e.g.
Mr Foo. - External
Id string - ID of the user in an external identity provider.
- Home string
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - Id string
- The provider-assigned unique ID for this managed resource.
- Repos string
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - Provider
Config GetUser Provider Config - User
Id string - User
Name string - Name of the user, e.g.
mr.foo@example.com.
- Acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - Active bool
- Whether the user is active.
- Alphanumeric string
- Alphanumeric representation of user local name. e.g.
mr_foo. - Application
Id string - Display
Name string - Display name of the user, e.g.
Mr Foo. - External
Id string - ID of the user in an external identity provider.
- Home string
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - Id string
- The provider-assigned unique ID for this managed resource.
- Repos string
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - Provider
Config GetUser Provider Config - User
Id string - User
Name string - Name of the user, e.g.
mr.foo@example.com.
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - active Boolean
- Whether the user is active.
- alphanumeric String
- Alphanumeric representation of user local name. e.g.
mr_foo. - application
Id String - display
Name String - Display name of the user, e.g.
Mr Foo. - external
Id String - ID of the user in an external identity provider.
- home String
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - id String
- The provider-assigned unique ID for this managed resource.
- repos String
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - provider
Config GetUser Provider Config - user
Id String - user
Name String - Name of the user, e.g.
mr.foo@example.com.
- acl
Principal stringId - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - active boolean
- Whether the user is active.
- alphanumeric string
- Alphanumeric representation of user local name. e.g.
mr_foo. - application
Id string - display
Name string - Display name of the user, e.g.
Mr Foo. - external
Id string - ID of the user in an external identity provider.
- home string
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - id string
- The provider-assigned unique ID for this managed resource.
- repos string
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - provider
Config GetUser Provider Config - user
Id string - user
Name string - Name of the user, e.g.
mr.foo@example.com.
- acl_
principal_ strid - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - active bool
- Whether the user is active.
- alphanumeric str
- Alphanumeric representation of user local name. e.g.
mr_foo. - application_
id str - display_
name str - Display name of the user, e.g.
Mr Foo. - external_
id str - ID of the user in an external identity provider.
- home str
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - id str
- The provider-assigned unique ID for this managed resource.
- repos str
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - provider_
config GetUser Provider Config - user_
id str - user_
name str - Name of the user, e.g.
mr.foo@example.com.
- acl
Principal StringId - identifier for use in databricks_access_control_rule_set, e.g.
users/mr.foo@example.com. - active Boolean
- Whether the user is active.
- alphanumeric String
- Alphanumeric representation of user local name. e.g.
mr_foo. - application
Id String - display
Name String - Display name of the user, e.g.
Mr Foo. - external
Id String - ID of the user in an external identity provider.
- home String
- Home folder of the user, e.g.
/Users/mr.foo@example.com. - id String
- The provider-assigned unique ID for this managed resource.
- repos String
- Personal Repos location of the user, e.g.
/Repos/mr.foo@example.com. - provider
Config Property Map - user
Id String - user
Name String - Name of the user, e.g.
mr.foo@example.com.
Supporting Types
GetUserProviderConfig
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace_
id str - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
