Skip to content

Commit 5058e50

Browse files
[Fix] Suppress equal fold diff for DLT pipeline resource (#4196)
## Changes Fixes databricks/cli#1763. During creation the `catalog` name for a DLT pipeline is normalized to small case causing a persistent drift. ## Tests Manually with the following configuration: ``` resource "databricks_pipeline" "this" { name = "testing caps" catalog = "MaiN" library { notebook { path = "/a/b/c" } } } ``` Before: There'd be a persistent drift where terraform would try to convert "MaiN" -> "main" After: No diff detected.
1 parent 7c29cca commit 5058e50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pipelines/resource_pipeline.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ func (Pipeline) CustomizeSchema(s *common.CustomizableSchema) *common.Customizab
230230
s.SchemaPath("edition").SetCustomSuppressDiff(common.EqualFoldDiffSuppress)
231231
s.SchemaPath("storage").SetCustomSuppressDiff(suppressStorageDiff)
232232

233+
// As of 6th Nov 2024, the DLT API only normalizes the catalog name when creating
234+
// a pipeline. So we only ignore the equal fold diff for the catalog name and not other
235+
// UC resources like target, schema or ingestion_definition.connection_name.
236+
s.SchemaPath("catalog").SetCustomSuppressDiff(common.EqualFoldDiffSuppress)
237+
233238
// Deprecated fields
234239
s.SchemaPath("cluster", "init_scripts", "dbfs").SetDeprecated(clusters.DbfsDeprecationWarning)
235240
s.SchemaPath("library", "whl").SetDeprecated("The 'whl' field is deprecated")

0 commit comments

Comments
 (0)