@@ -20,15 +20,15 @@ func diffPermissionsForPrincipal(principal string, desired catalog.PermissionsLi
2020 // diffs change sets for principal
2121 configured := map [string ]* schema.Set {}
2222 for _ , v := range desired .PrivilegeAssignments {
23- if strings . EqualFold ( v .Principal , principal ) {
24- configured [strings . ToLower ( v .Principal ) ] = permissions .SliceToSet (v .Privileges )
23+ if v .Principal == principal {
24+ configured [v .Principal ] = permissions .SliceToSet (v .Privileges )
2525 }
2626 }
2727 // existing permissions that needs removal for principal
2828 remote := map [string ]* schema.Set {}
2929 for _ , v := range existing .PrivilegeAssignments {
30- if strings . EqualFold ( v .Principal , principal ) {
31- remote [strings . ToLower ( v .Principal ) ] = permissions .SliceToSet (v .Privileges )
30+ if v .Principal == principal {
31+ remote [v .Principal ] = permissions .SliceToSet (v .Privileges )
3232 }
3333 }
3434 // STEP 1: detect overlaps
@@ -87,7 +87,7 @@ func filterPermissionsForPrincipal(in catalog.PermissionsList, principal string)
8787 grantsForPrincipal := []permissions.UnityCatalogPrivilegeAssignment {}
8888 for _ , v := range in .PrivilegeAssignments {
8989 privileges := []string {}
90- if strings . EqualFold ( v .Principal , principal ) {
90+ if v .Principal == principal {
9191 for _ , p := range v .Privileges {
9292 privileges = append (privileges , p .String ())
9393 }
@@ -122,7 +122,7 @@ func parseSecurableId(d *schema.ResourceData) (string, string, string, error) {
122122func ResourceGrant () common.Resource {
123123 s := common .StructToSchema (permissions.UnityCatalogPrivilegeAssignment {},
124124 func (m map [string ]* schema.Schema ) map [string ]* schema.Schema {
125- common .CustomizeSchemaPath (m , "principal" ).SetForceNew (). SetCustomSuppressDiff ( common . EqualFoldDiffSuppress )
125+ common .CustomizeSchemaPath (m , "principal" ).SetForceNew ()
126126
127127 // set custom hash function for privileges
128128 common .MustSchemaPath (m , "privileges" ).Set = func (i any ) int {
0 commit comments