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 feature request - add attribute 'active' to databricks_user Data Source #3731

Closed
w0ut0 opened this issue Jul 3, 2024 · 0 comments · Fixed by #3733
Closed
Labels
feature New feature or request

Comments

@w0ut0
Copy link

w0ut0 commented Jul 3, 2024

Use-cases

Our users are provisioned from AAD using SCIM. When the user is deleted in AAD he is set to 'inactive' in Databricks accounts.
There is currently no way to get that property using the data block databricks_user (while it is supported for the resource databricks_user).

Attempted Solutions

We are now also (trying to) get the user using azure_ad provider, and comparing properties, but this is not a nice solution.

Proposal

Add attribute active to data block databricks_user, as it is included in the rest api.

References

@w0ut0 w0ut0 added the feature New feature or request label Jul 3, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 28, 2024
)

## Changes
Add `active` attribute to `databricks_user` data source.

Resolves #3731 

## Tests
Acceptance test and verified using the following code:
```
terraform {
  required_providers {
    databricks = {
      source = "databricks/databricks"
    }
  }
}

provider "databricks" {
  profile = "<REDACTED>"
}

data "databricks_user" "this" {
  user_name = "<REDACTED>"
}

output "user" {
  value = data.databricks_user.this.active
}
```

Output:
```
❯ terraform apply
data.databricks_user.this: Reading...
data.databricks_user.this: Read complete after 1s [id=<REDACTED>]

Changes to Outputs:
  + user = true
```

- [x] `make test` run locally
- [x] relevant change in `docs/` folder
- [ ] covered with integration tests in `internal/acceptance`
- [x] relevant acceptance tests are passing
- [ ] using Go SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant