Skip to content

Commit

Permalink
[Exporter] Add references for missing permissions/grants types (#4390)
Browse files Browse the repository at this point in the history
## Changes
<!-- Summary of your changes that are easy to understand -->

There were missing references:

- permissions: model serving and vector search endpoints
- grants: service credentials

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->

- [x] `make test` run locally
- [ ] relevant change in `docs/` folder
- [ ] covered with integration tests in `internal/acceptance`
- [ ] using Go SDK
- [ ] using TF Plugin Framework
  • Loading branch information
alexott authored Jan 10, 2025
1 parent 1411692 commit 5102bc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/resources/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ General Permissions API does not apply to access control for tables and they hav

## Data Access with Unity Catalog

Initially in Unity Catalog all users have no access to data, which has to be later assigned through [databricks_grants](grants.md) resource.
Initially in Unity Catalog all users have no access to data, which has to be later assigned through [databricks_grants](grants.md) or [databricks_grant](grant.md) resource.

## Argument Reference

Expand Down
3 changes: 3 additions & 0 deletions exporter/importables.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,8 @@ var resourcesMap map[string]importable = map[string]importable{
{Path: "registered_model_id", Resource: "databricks_mlflow_model"},
{Path: "experiment_id", Resource: "databricks_mlflow_experiment"},
{Path: "repo_id", Resource: "databricks_repo"},
{Path: "vector_search_endpoint_id", Resource: "databricks_vector_search_endpoint", Match: "endpoint_id"},
{Path: "serving_endpoint_id", Resource: "databricks_serving_endpoint", Match: "serving_endpoint_id"},
// TODO: can we fill _path component for it, and then match on user/SP home instead?
{Path: "directory_id", Resource: "databricks_directory", Match: "object_id"},
{Path: "notebook_id", Resource: "databricks_notebook", Match: "object_id"},
Expand Down Expand Up @@ -2918,6 +2920,7 @@ var resourcesMap map[string]importable = map[string]importable{
{Path: "model", Resource: "databricks_registered_model"},
{Path: "external_location", Resource: "databricks_external_location", Match: "name"},
{Path: "storage_credential", Resource: "databricks_storage_credential"},
{Path: "credential", Resource: "databricks_credential"},
// TODO: add similar matchers for users/groups/SPs on account level...
{Path: "grant.principal", Resource: "databricks_recipient", IsValidApproximation: isMatchingShareRecipient},
// {Path: "", Resource: ""},
Expand Down

0 comments on commit 5102bc2

Please sign in to comment.