|
1 | 1 | package provider |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "bytes" |
5 | 4 | "context" |
6 | 5 | "fmt" |
7 | 6 | "strings" |
@@ -143,7 +142,6 @@ func getMaskingExceptionPolicySchema(computed bool) *schema.Schema { |
143 | 142 | }, |
144 | 143 | }, |
145 | 144 | }, |
146 | | - Set: exceptionHash, |
147 | 145 | }, |
148 | 146 | }, |
149 | 147 | }, |
@@ -485,36 +483,7 @@ func flattenMaskingExceptionPolicy(p *v1pb.MaskingExceptionPolicy) ([]interface{ |
485 | 483 | exceptionList = append(exceptionList, raw) |
486 | 484 | } |
487 | 485 | policy := map[string]interface{}{ |
488 | | - "exceptions": schema.NewSet(exceptionHash, exceptionList), |
| 486 | + "exceptions": exceptionList, |
489 | 487 | } |
490 | 488 | return []interface{}{policy}, nil |
491 | 489 | } |
492 | | - |
493 | | -func exceptionHash(rawException interface{}) int { |
494 | | - var buf bytes.Buffer |
495 | | - exception := rawException.(map[string]interface{}) |
496 | | - |
497 | | - if v, ok := exception["database"].(string); ok { |
498 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
499 | | - } |
500 | | - if v, ok := exception["schema"].(string); ok { |
501 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
502 | | - } |
503 | | - if v, ok := exception["table"].(string); ok { |
504 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
505 | | - } |
506 | | - if v, ok := exception["column"].(string); ok { |
507 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
508 | | - } |
509 | | - if v, ok := exception["member"].(string); ok { |
510 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
511 | | - } |
512 | | - if v, ok := exception["action"].(string); ok { |
513 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
514 | | - } |
515 | | - if v, ok := exception["expire_timestamp"].(string); ok { |
516 | | - _, _ = buf.WriteString(fmt.Sprintf("%s-", v)) |
517 | | - } |
518 | | - |
519 | | - return internal.ToHashcodeInt(buf.String()) |
520 | | -} |
0 commit comments