From 7548022180cb684d82125ff0116d18826a0d2cec Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Thu, 5 Dec 2024 12:55:24 +0100 Subject: [PATCH] [Exporter] Fix generation of references to users for user directories During refactoring, the exact references to user's home were removed, leading to the problems with references when doing initial import --- exporter/importables.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exporter/importables.go b/exporter/importables.go index 0aa38acd8..a08cfc7c1 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},