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

[ISSUE] with databricks_user resource. Adding 'force' for admin user fails #1639

Closed
rohitnijhawan opened this issue Sep 28, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@rohitnijhawan
Copy link
Contributor

  • The force flag was manually added to the users.tf file output after the exporter ran.
  • User data_lake is an admin in the source workspace
  • User data_lake and their admin token is used to run terraform apply on the target workspace

Configuration

  resource "databricks_user" "data_lake" {
    user_name                  = "data_lake@acmecorp.com"
    allow_instance_pool_create = true
    allow_cluster_create       = true
    active                     = true
    force                      = true
  }

Expected Behavior

We expected that the existence of the user would be ignored as per the documentation.

Actual Behavior

  • The Terraform apply command issues an error:
    The user [data_lake@acmecorp.com] already exists in the DR workspace.
  • We see below error message
    Error: cannot delete group member: PERMISSION_DENIED: Requesting user [data_lake@acmecorp.com] is not an admin.
  • And also, attempting to insert force = true removed “Admin” permissions of that user in the destination workspace.

Steps to Reproduce

Run terraform exporter
Run terraform apply against a different workspace multiple times using the token of an admin user.

Terraform and provider versions

TF > 0.15
Provider > 1.2.0

@alexott alexott added the exporter TF configuration generator label Sep 30, 2022
@alexott
Copy link
Contributor

alexott commented Jan 5, 2023

Hmmm, I'm not able to reproduce it. Please collect debug logs when this happens

@alexott
Copy link
Contributor

alexott commented Oct 10, 2023

let's track it as a part of #2648

@alexott alexott added bug Something isn't working and removed exporter TF configuration generator labels Nov 3, 2023
@alexott
Copy link
Contributor

alexott commented Nov 4, 2023

Fixed by #2878

@alexott alexott closed this as completed Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants