published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
This resource allows you to attach a role or databricks.InstanceProfile (AWS) to databricks_user.
Related Resources
The following resources are often used in the same context:
- End to end workspace management guide.
- databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
- databricks_group_member to attach users and groups as group members.
- databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
- databricks.User to manage users, that could be added to databricks.Group within the workspace.
- databricks.User data to retrieves information about databricks_user.
Example Usage
Adding AWS instance profile to a user
using Pulumi;
using Databricks = Pulumi.Databricks;
class MyStack : Stack
{
public MyStack()
{
var instanceProfile = new Databricks.InstanceProfile("instanceProfile", new Databricks.InstanceProfileArgs
{
InstanceProfileArn = "my_instance_profile_arn",
});
var myUser = new Databricks.User("myUser", new Databricks.UserArgs
{
UserName = "me@example.com",
});
var myUserRole = new Databricks.UserRole("myUserRole", new Databricks.UserRoleArgs
{
UserId = myUser.Id,
Role = instanceProfile.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 {
instanceProfile, err := databricks.NewInstanceProfile(ctx, "instanceProfile", &databricks.InstanceProfileArgs{
InstanceProfileArn: pulumi.String("my_instance_profile_arn"),
})
if err != nil {
return err
}
myUser, err := databricks.NewUser(ctx, "myUser", &databricks.UserArgs{
UserName: pulumi.String("me@example.com"),
})
if err != nil {
return err
}
_, err = databricks.NewUserRole(ctx, "myUserRole", &databricks.UserRoleArgs{
UserId: myUser.ID(),
Role: instanceProfile.ID(),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
const myUser = new databricks.User("myUser", {userName: "me@example.com"});
const myUserRole = new databricks.UserRole("myUserRole", {
userId: myUser.id,
role: instanceProfile.id,
});
import pulumi
import pulumi_databricks as databricks
instance_profile = databricks.InstanceProfile("instanceProfile", instance_profile_arn="my_instance_profile_arn")
my_user = databricks.User("myUser", user_name="me@example.com")
my_user_role = databricks.UserRole("myUserRole",
user_id=my_user.id,
role=instance_profile.id)
Example coming soon!
Adding user as administrator to Databricks Account
using Pulumi;
using Databricks = Pulumi.Databricks;
class MyStack : Stack
{
public MyStack()
{
var myUser = new Databricks.User("myUser", new Databricks.UserArgs
{
UserName = "me@example.com",
});
var myUserAccountAdmin = new Databricks.UserRole("myUserAccountAdmin", new Databricks.UserRoleArgs
{
UserId = myUser.Id,
Role = "account_admin",
});
}
}
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 {
myUser, err := databricks.NewUser(ctx, "myUser", &databricks.UserArgs{
UserName: pulumi.String("me@example.com"),
})
if err != nil {
return err
}
_, err = databricks.NewUserRole(ctx, "myUserAccountAdmin", &databricks.UserRoleArgs{
UserId: myUser.ID(),
Role: pulumi.String("account_admin"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const myUser = new databricks.User("myUser", {userName: "me@example.com"});
const myUserAccountAdmin = new databricks.UserRole("myUserAccountAdmin", {
userId: myUser.id,
role: "account_admin",
});
import pulumi
import pulumi_databricks as databricks
my_user = databricks.User("myUser", user_name="me@example.com")
my_user_account_admin = databricks.UserRole("myUserAccountAdmin",
user_id=my_user.id,
role="account_admin")
Example coming soon!
Create UserRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserRole(name: string, args: UserRoleArgs, opts?: CustomResourceOptions);@overload
def UserRole(resource_name: str,
args: UserRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
user_id: Optional[str] = None)func NewUserRole(ctx *Context, name string, args UserRoleArgs, opts ...ResourceOption) (*UserRole, error)public UserRole(string name, UserRoleArgs args, CustomResourceOptions? opts = null)
public UserRole(String name, UserRoleArgs args)
public UserRole(String name, UserRoleArgs args, CustomResourceOptions options)
type: databricks:UserRole
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 UserRoleArgs
- 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 UserRoleArgs
- 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 UserRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserRoleArgs
- 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 userRoleResource = new Databricks.UserRole("userRoleResource", new()
{
Role = "string",
UserId = "string",
});
example, err := databricks.NewUserRole(ctx, "userRoleResource", &databricks.UserRoleArgs{
Role: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var userRoleResource = new UserRole("userRoleResource", UserRoleArgs.builder()
.role("string")
.userId("string")
.build());
user_role_resource = databricks.UserRole("userRoleResource",
role="string",
user_id="string")
const userRoleResource = new databricks.UserRole("userRoleResource", {
role: "string",
userId: "string",
});
type: databricks:UserRole
properties:
role: string
userId: string
UserRole 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 UserRole resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the UserRole 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 UserRole Resource
Get an existing UserRole 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?: UserRoleState, opts?: CustomResourceOptions): UserRole@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
role: Optional[str] = None,
user_id: Optional[str] = None) -> UserRolefunc GetUserRole(ctx *Context, name string, id IDInput, state *UserRoleState, opts ...ResourceOption) (*UserRole, error)public static UserRole Get(string name, Input<string> id, UserRoleState? state, CustomResourceOptions? opts = null)public static UserRole get(String name, Output<String> id, UserRoleState state, CustomResourceOptions options)resources: _: type: databricks:UserRole 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.
Import
-> Note Importing this resource is not currently supported.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
