Skip to content

Commit

Permalink
fix: do not redefine build-in new
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta committed Nov 12, 2024
1 parent b718827 commit 26864cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/service/database/properties/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func stringSlice(val interface{}) ([]string, bool) {
func getKeyDiffSuppressFunc(key string) schema.SchemaDiffSuppressFunc {
switch key {
case "ip_filter":
return func(_, old, new string, _ *schema.ResourceData) bool {
return strings.TrimSuffix(old, "/32") == strings.TrimSuffix(new, "/32")
return func(_, oldValue, newValue string, _ *schema.ResourceData) bool {
return strings.TrimSuffix(oldValue, "/32") == strings.TrimSuffix(newValue, "/32")
}
default:
return nil
Expand Down
4 changes: 2 additions & 2 deletions internal/service/server/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ func getTagChange(oldTags, newTags []string) (tagsToAdd, tagsToDelete []string)
return
}

func tagsHasChange(old, new interface{}) bool {
func tagsHasChange(oldTags, newTags interface{}) bool {
// Check how tags would change
toAdd, toDelete := getTagChange(utils.ExpandStrings(old), utils.ExpandStrings(new))
toAdd, toDelete := getTagChange(utils.ExpandStrings(oldTags), utils.ExpandStrings(newTags))

// If no tags would be added or deleted, no change will be made
if len(toAdd) == 0 && len(toDelete) == 0 {
Expand Down

0 comments on commit 26864cd

Please sign in to comment.