databricks_user_role Resource

This resource allows you to attach a role or databricks_instance_profile (AWS) to databricks_user.

Example Usage

Adding AWS instance profile to a user

resource "databricks_instance_profile" "instance_profile" {
  instance_profile_arn = "my_instance_profile_arn"
}

resource "databricks_user" "my_user" {
  user_name = "me@example.com"
}

resource "databricks_user_role" "my_user_role" {
  user_id = databricks_user.my_user.id
  role    = databricks_instance_profile.instance_profile.id
}

Adding user as administrator to Databricks Account

provider "databricks" {
  host          = "https://accounts.cloud.databricks.com"
  account_id    = var.databricks_account_id
  client_id     = var.client_id
  client_secret = var.client_secret
}

resource "databricks_user" "my_user" {
  user_name = "me@example.com"
}

resource "databricks_user_role" "my_user_account_admin" {
  user_id = databricks_user.my_user.id
  role    = "account_admin"
}

Argument Reference

The following arguments are supported:

Attribute Reference

In addition to all arguments above, the following attributes are exported:

Import

The following resources are often used in the same context: