From 2f4b570479c63123571f14dcda87081fb42e6eb7 Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Thu, 5 Dec 2024 10:30:38 -0500 Subject: [PATCH] [Exporter] Fix generation of references to users for user directories (#4297) ## Changes During refactoring, the exact references to user's home were removed, leading to the problems with references when doing initial import ## 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 <88379306+tanmay-db@users.noreply.github.com> --- exporter/importables.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exporter/importables.go b/exporter/importables.go index 0aa38acd8b..a08cfc7c10 100644 --- a/exporter/importables.go +++ b/exporter/importables.go @@ -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},