databricks_entitlements Resource

This resource allows you to set entitlements to existing databricks_users, databricks_group or databricks_service_principal.

Example Usage

Setting entitlements for a regular user:

data "databricks_user" "me" {
  user_name = "me@example.com"
}

resource "databricks_entitlements" "me" {
  user_id                    = data.databricks_user.me.id
  allow_cluster_create       = true
  allow_instance_pool_create = true
}

Setting entitlements for a service principal:

data "databricks_service_principal" "this" {
  application_id = "11111111-2222-3333-4444-555666777888"
}

resource "databricks_entitlements" "this" {
  service_principal_id       = data.databricks_service_principal.this.sp_id
  allow_cluster_create       = true
  allow_instance_pool_create = true
}

Setting entitlements to all users in a workspace - referencing special users databricks_group

data "databricks_group" "users" {
  display_name = "users"
}

resource "databricks_entitlements" "workspace-users" {
  group_id                   = data.databricks_group.users.id
  allow_cluster_create       = true
  allow_instance_pool_create = true
}

Argument Reference

The following arguments are available to specify the identity you need to enforce entitlements. You must specify exactly one of those arguments otherwise resource creation will fail.

The following entitlements are available.

Import

The resource can be imported using a synthetic identifier. Examples of valid synthetic identifiers are:

terraform import databricks_entitlements.me user/<user-id>

The following resources are often used in the same context: