Skip to content

Commit

Permalink
Ignore trailing newline
Browse files Browse the repository at this point in the history
  • Loading branch information
saamalik committed Mar 7, 2021
1 parent 0f79aea commit d1203dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spectrocloud/resource_cluster_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/spectrocloud/hapi/models"
"github.com/spectrocloud/terraform-provider-spectrocloud/pkg/client"
"log"
"strings"
"time"
)

Expand Down Expand Up @@ -68,6 +69,13 @@ func resourceClusterProfile() *schema.Resource {
"values": {
Type: schema.TypeString,
Required: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
// UI strips the trailing newline on save
if strings.TrimSuffix(old, "\n") == strings.TrimSuffix(new, "\n") {
return true
}
return false
},
},
},
},
Expand Down

0 comments on commit d1203dc

Please sign in to comment.