Skip to content

Commit

Permalink
adding fix for #994
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Jun 18, 2024
1 parent 58b50f6 commit 3b3421b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bigip/resource_bigip_awaf_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"fmt"
"log"
"os"
"reflect"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -344,6 +345,16 @@ func resourceBigipAwafPolicy() *schema.Resource {
Type: schema.TypeString,
Optional: true,
//Computed: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
oldResp := []byte(old)
newResp := []byte(new)
oldJsonref := make(map[string]interface{})
newJsonref := make(map[string]interface{})
_ = json.Unmarshal(oldResp, &oldJsonref)
_ = json.Unmarshal(newResp, &newJsonref)
jsonEqualityBefore := reflect.DeepEqual(oldJsonref, newJsonref)
return jsonEqualityBefore
},
Description: "The payload of the WAF Policy to be used for IMPORT on to BIGIP",
},
"policy_export_json": {
Expand Down

0 comments on commit 3b3421b

Please sign in to comment.