Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] New data block databricks_users #3468

Open
w0ut0 opened this issue Apr 15, 2024 · 1 comment · May be fixed by #4028
Open

[FEATURE] New data block databricks_users #3468

w0ut0 opened this issue Apr 15, 2024 · 1 comment · May be fixed by #4028
Labels
feature New feature or request good first issue this is something simple that can help started with provider development

Comments

@w0ut0
Copy link

w0ut0 commented Apr 15, 2024

Use-cases

I want to be able to get all users provisioned to my Databricks account (or, depending on provider configuration, workspace). My use case is adding them to a certain 'default' catalog (or group), and create a schema for every user that they can use as 'personal space'.

Attempted Solutions

  • I can use AzureAD provider to query the SCIM app, and go from there, but this is not clean (nor cloud-agnostic).
  • I can also use data block databricks_group to fetch the built-in group account users (or users in a workspace context).

Proposal

A data block that uses the account-level List users endpoint. Should be have similar as existing databricks_service_principals.

data "databricks_users" "users" {
  display_name_contains = "@domain.org"
}
  • display_name_contains - (Optional) Only return display name that match the given name string

I see it returning 2 possible outputs:

  • either a map of user_id => display_name mapping, that can then be used in databricks_user data block to fetch further details (like how it is done for databricks_service_principals, or
  • a list of users, with some basic attributes like id, external_id, user_name, display_name,.. (similar to azuread_users)

References

@w0ut0 w0ut0 added the feature New feature or request label Apr 15, 2024
@Serpinex3
Copy link

In addition to @w0ut0 request, we would also be happy having a databricks_groups data source similar to databricks_service_principals with an optional attribute display_name_contains.

Something like this:

data "databricks_groups" "groups" {
  display_name_contains = "xyz"
}

This data source would allow us to retrieve a list of all SCIM provisioned Entra ID groups and pass the information (e.g. the Databricks internal group ID) via a configuration store to all our downstream users.

@alexott alexott added the good first issue this is something simple that can help started with provider development label Aug 28, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Sep 13, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Sep 16, 2024
…chema, and only request the id, userName, and displayName attributes. added succesful initial test_case on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Sep 17, 2024
…o to allow filtering by userName, and added additional test cases on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Sep 17, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Sep 17, 2024
@dgomez04 dgomez04 linked a pull request Sep 17, 2024 that will close this issue
5 tasks
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
…chema, and only request the id, userName, and displayName attributes. added succesful initial test_case on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
…o to allow filtering by userName, and added additional test cases on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
… adding support for both workspace and account-level usage.
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
…chema, and only request the id, userName, and displayName attributes. added succesful initial test_case on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
…o to allow filtering by userName, and added additional test cases on data_users_test.go
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
dgomez04 added a commit to dgomez04/terraform-provider-databricks that referenced this issue Oct 23, 2024
…pport for workspace-level and account-level provider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue this is something simple that can help started with provider development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants