Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 3.73 KB

File metadata and controls

83 lines (59 loc) · 3.73 KB
subcategory Security

databricks_group_member Resource

This resource allows you to attach users, service_principal, and groups as group members.

-> This resource can be used with an account or workspace-level provider.

To attach members to groups in the Databricks account, the provider must be configured with host = "https://accounts.cloud.databricks.com" on AWS deployments or host = "https://accounts.azuredatabricks.net" and authenticate using AAD tokens on Azure deployments

Example Usage

After the following example, Bradley would have direct membership in group B and transitive membership in group A.

resource "databricks_group" "a" {
  display_name = "A"
}

resource "databricks_group" "b" {
  display_name = "B"
}

resource "databricks_group_member" "ab" {
  group_id  = databricks_group.a.id
  member_id = databricks_group.b.id
}

resource "databricks_user" "bradley" {
  user_name = "bradley@example.com"
}

resource "databricks_group_member" "bb" {
  group_id  = databricks_group.b.id
  member_id = databricks_user.bradley.id
}

Argument Reference

The following arguments are supported:

  • group_id - (Required) This is the id attribute (SCIM ID) of the group resource.
  • member_id - (Required) This is the id attribute (SCIM ID) of the group, service principal, or user.
  • api - (Optional) Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host.

Attribute Reference

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

  • id - The id for the databricks_group_member object which is in the format <group_id>|<member_id>.

Import

You can import a databricks_group_member resource with name my_group_member like the following:

import {
  to = databricks_group_member.my_group_member
  id = "<group_id>|<member_id>"
}

Alternatively, when using terraform version 1.4 or earlier, import using the terraform import command:

terraform import databricks_group_member.my_group_member "<group_id>|<member_id>"

Related Resources

The following resources are often used in the same context: