Skip to content

Commit af09787

Browse files
authored
[Exporter] Fix to support Serverless DLT (#3796)
## Changes <!-- Summary of your changes that are easy to understand --> When Serverless DLT pipeline is created, the `edition` isn't set on it, leading to generation of `edition = ""` that leads to error in plan/apply. This PR fixes that ## 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
1 parent 184a92d commit af09787

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

exporter/importables.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,10 +2023,15 @@ var resourcesMap map[string]importable = map[string]importable{
20232023
if res := dltClusterRegex.FindStringSubmatch(pathString); res != nil { // analyze DLT clusters
20242024
return makeShouldOmitFieldForCluster(dltClusterRegex)(ic, pathString, as, d)
20252025
}
2026-
if pathString == "storage" {
2026+
switch pathString {
2027+
case "storage":
20272028
return dltDefaultStorageRegex.FindStringSubmatch(d.Get("storage").(string)) != nil
2029+
case "edition":
2030+
return d.Get("edition").(string) == ""
2031+
case "creator_user_name":
2032+
return true
20282033
}
2029-
return pathString == "creator_user_name" || defaultShouldOmitFieldFunc(ic, pathString, as, d)
2034+
return defaultShouldOmitFieldFunc(ic, pathString, as, d)
20302035
},
20312036
Ignore: func(ic *importContext, r *resource) bool {
20322037
numLibraries := r.Data.Get("library.#").(int)

0 commit comments

Comments
 (0)