databricks_group Resource

This resource allows you to manage both account groups and workspace-local groups. You can use the databricks_group_member resource to assign Databricks users, service principals as well as other groups as members of the group. This is useful if you are using an application to sync users & groups with SCIM API.

To create account groups in the Databricks account, the provider must be configured accordingly. On AWS deployment with host = "https://accounts.cloud.databricks.com" and account_id = "00000000-0000-0000-0000-000000000000". On Azure deployments host = "https://accounts.azuredatabricks.net", account_id = "00000000-0000-0000-0000-000000000000" and using AAD tokens as authentication.

Recommended to use along with Identity Provider SCIM provisioning to populate users into those groups:

Example Usage

Creating some group

resource "databricks_group" "this" {
  display_name               = "Some Group"
  allow_cluster_create       = true
  allow_instance_pool_create = true
}

Adding databricks_user as databricks_group_member of some group

resource "databricks_group" "this" {
  display_name               = "Some Group"
  allow_cluster_create       = true
  allow_instance_pool_create = true
}

resource "databricks_user" "this" {
  user_name = "someone@example.com"
}

resource "databricks_group_member" "vip_member" {
  group_id  = databricks_group.this.id
  member_id = databricks_user.this.id
}

Creating group in AWS Databricks account:

// initialize provider at account-level
provider "databricks" {
  alias         = "mws"
  host          = "https://accounts.cloud.databricks.com"
  account_id    = "00000000-0000-0000-0000-000000000000"
  client_id     = var.client_id
  client_secret = var.client_secret
}

resource "databricks_group" "this" {
  provider     = databricks.mws
  display_name = "Some Group"
}

Creating group in Azure Databricks account:

// initialize provider at Azure account-level
provider "databricks" {
  alias      = "azure_account"
  host       = "https://accounts.azuredatabricks.net"
  account_id = "00000000-0000-0000-0000-000000000000"
  auth_type  = "azure-cli"
}

resource "databricks_group" "this" {
  provider     = databricks.azure_account
  display_name = "Some Group"
}

Argument Reference

The following arguments are supported:

Attribute Reference

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

Import

You can import a databricks_group resource with the name my_group like the following:

terraform import databricks_group.my_group <group_id>