File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ENHANCEMENTS:
55
66BUG FIXES:
77* Fix error while importing monitor having timeZone as ` null ` in the Email notification object. (GH-637 )
8+ * Fix perpetual diff in Extraction Rules by normalizing the parse expression.
89
910## 2.28.3 (March 5, 2024)
1011
Original file line number Diff line number Diff line change @@ -41,10 +41,12 @@ func resourceSumologicFieldExtractionRule() *schema.Resource {
4141 Type : schema .TypeString ,
4242 Required : true ,
4343 DiffSuppressFunc : func (k , old , new string , d * schema.ResourceData ) bool {
44- if strings .Trim (old , "\n " ) == strings .Trim (new , "\n " ) {
45- return true
44+ // Ignores leading spaces, leading newlines and single leading |
45+ // Ignores trailing spaces and trailing newlines.
46+ normalize := func (s string ) string {
47+ return strings .TrimSpace (strings .TrimPrefix (strings .Trim (s , "\n " ), "|" ))
4648 }
47- return false
49+ return normalize ( old ) == normalize ( new )
4850 },
4951 },
5052 "enabled" : {
You can’t perform that action at this time.
0 commit comments