mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
22 lines
364 B
Go
22 lines
364 B
Go
|
package structure
|
||
|
|
||
|
import (
|
||
|
"reflect"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/schema"
|
||
|
)
|
||
|
|
||
|
func SuppressJsonDiff(k, old, new string, d *schema.ResourceData) bool {
|
||
|
oldMap, err := ExpandJsonFromString(old)
|
||
|
if err != nil {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
newMap, err := ExpandJsonFromString(new)
|
||
|
if err != nil {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
return reflect.DeepEqual(oldMap, newMap)
|
||
|
}
|