Skip to content

Commit

Permalink
[Exporter] Fix generation of references to users for user directories (
Browse files Browse the repository at this point in the history
…#4297)

## Changes
<!-- Summary of your changes that are easy to understand -->

During refactoring, the exact references to user's home were removed,
leading to the problems with references when doing initial import

## 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`
- [ ] relevant acceptance tests are passing
- [ ] using Go SDK

Co-authored-by: Tanmay Rustagi <[email protected]>
  • Loading branch information
alexott and tanmay-db authored Dec 5, 2024
1 parent dc0e8fd commit 2f4b570
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exporter/importables.go
Original file line number Diff line number Diff line change
Expand Up @@ -2271,6 +2271,8 @@ var resourcesMap map[string]importable = map[string]importable{
},
Body: resourceOrDataBlockBody,
Depends: []reference{
{Path: "path", Resource: "databricks_user", Match: "home"},
{Path: "path", Resource: "databricks_service_principal", Match: "home"},
// TODO: it should try to find longest reference to another directory object that it not itself...
{Path: "path", Resource: "databricks_user", Match: "home",
MatchType: MatchPrefix, SearchValueTransformFunc: appendEndingSlashToDirName},
Expand Down

0 comments on commit 2f4b570

Please sign in to comment.