Skip to content

Commit

Permalink
[Exporter] Fix to support Serverless DLT (#3796)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
alexott authored Jul 19, 2024
1 parent 184a92d commit af09787
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions exporter/importables.go
Original file line number Diff line number Diff line change
Expand Up @@ -2023,10 +2023,15 @@ var resourcesMap map[string]importable = map[string]importable{
if res := dltClusterRegex.FindStringSubmatch(pathString); res != nil { // analyze DLT clusters
return makeShouldOmitFieldForCluster(dltClusterRegex)(ic, pathString, as, d)
}
if pathString == "storage" {
switch pathString {
case "storage":
return dltDefaultStorageRegex.FindStringSubmatch(d.Get("storage").(string)) != nil
case "edition":
return d.Get("edition").(string) == ""
case "creator_user_name":
return true
}
return pathString == "creator_user_name" || defaultShouldOmitFieldFunc(ic, pathString, as, d)
return defaultShouldOmitFieldFunc(ic, pathString, as, d)
},
Ignore: func(ic *importContext, r *resource) bool {
numLibraries := r.Data.Get("library.#").(int)
Expand Down

0 comments on commit af09787

Please sign in to comment.