cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Regarding Databricks Terraform to new user

VGS777
New Contributor III

Hey Folks

I am new to terraform and databricks

I have usecase 

I want to create new user or add them to databricks workspace. And assign role to this user. And also assign cluster to this new user

After 12hrs I want to delete this new user and also these resources. 

Can anyone please advice me on this how can we use terraform for this scenerio

#terraform  #beginner #help 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager
  1. Create a User in Databricks Workspace: You can use the databricks_user resource to create a new user in your Databricks workspace. Specify the userโ€™s email address and any other relevant details.

  2. Assign Roles: You can associate roles with the user using the databricks_group_member resource. For example, if you have an existing group called โ€œadmins,โ€ you can add the user to it.

  3. Assign Cluster: If you want to assign a specific cluster to the user, you can use the databricks_cluster resource. Specify the cluster details and associate it with the user.

  4. Scheduled Deletion: To delete the user and associated resources after 12 hours, youโ€™ll need to implement a custom solution. You can use external tools (e.g., a script or a scheduler) to trigger the Terraform destroy operation after the specified time.

You can find more details in the official Terraform documentation. Good luck with your Terraform journey! ๐Ÿš€๐Ÿ‘

 

View solution in original post

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager
  1. Create a User in Databricks Workspace: You can use the databricks_user resource to create a new user in your Databricks workspace. Specify the userโ€™s email address and any other relevant details.

  2. Assign Roles: You can associate roles with the user using the databricks_group_member resource. For example, if you have an existing group called โ€œadmins,โ€ you can add the user to it.

  3. Assign Cluster: If you want to assign a specific cluster to the user, you can use the databricks_cluster resource. Specify the cluster details and associate it with the user.

  4. Scheduled Deletion: To delete the user and associated resources after 12 hours, youโ€™ll need to implement a custom solution. You can use external tools (e.g., a script or a scheduler) to trigger the Terraform destroy operation after the specified time.

You can find more details in the official Terraform documentation. Good luck with your Terraform journey! ๐Ÿš€๐Ÿ‘

 

VGS777
New Contributor III

Thanks for this information ๐Ÿ˜ƒ

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group