Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mmv1/products/iambeta/WorkloadIdentityPoolProvider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ properties:
}
```
required: false
state_func: 'func(v interface{}) string { s, _ := structure.NormalizeJsonString(v); return s }'
diff_suppress_func: 'jwksJsonDiffSuppress'
is_missing_in_cai: true
- name: 'saml'
type: NestedObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,21 @@ func ValidateWorkloadIdentityPoolProviderId(v interface{}, k string) (ws []strin

return
}

func jwksJsonDiffSuppress(k, old, new string, d *schema.ResourceData) bool {
if old == "" || new == "" {
return old == new
}

var oldJson, newJson interface{}

if err := json.Unmarshal([]byte(old), &oldJson); err != nil {
return false
}

if err := json.Unmarshal([]byte(new), &newJson); err != nil {
return false
}

return reflect.DeepEqual(oldJson, newJson)
}
Loading