Skip to content

Commit

Permalink
fix: [CDS-101017]: fix unsaved changes in plan for snow url without s…
Browse files Browse the repository at this point in the history
…lash (#1115)
  • Loading branch information
naman-goenka authored Nov 17, 2024
1 parent 1a9e879 commit 255764f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1115.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```relese-note:fix
harness_platform_connector_service_now: omit difference of slash in service_now_url
```
6 changes: 6 additions & 0 deletions internal/service/platform/connector/service_now.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package connector

import (
"context"
"strings"

"github.com/harness/harness-go-sdk/harness/nextgen"
"github.com/harness/terraform-provider-harness/helpers"
Expand All @@ -25,6 +26,11 @@ func ResourceConnectorServiceNow() *schema.Resource {
Description: "URL of service now.",
Type: schema.TypeString,
Required: true,
// Suppress the diff shown if the service_now_url are equal when both compared after removing / suffix if present.
// API implementation returns url appended with /
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
return strings.TrimSuffix(old, "/") == strings.TrimSuffix(new, "/")
},
},
"username": {
Description: "Username to use for authentication.",
Expand Down

0 comments on commit 255764f

Please sign in to comment.