Skip to content

Commit

Permalink
fix aliasSuppression
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuZad committed May 11, 2024
1 parent 437bba9 commit cbc7086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/provider/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func diffSuppressEmails(k, old, new string, d *schema.ResourceData) bool {
}

func diffSuppressAliases(k, old, new string, d *schema.ResourceData) bool {
// The configAliases list returns an incorrect value if "aliases" is removed, rather than set to []
stateAliases, configAliases := d.GetChange("aliases")

stateList := listOfInterfacestoStrings(stateAliases.([]interface{}))
Expand All @@ -57,7 +58,7 @@ func diffSuppressAliases(k, old, new string, d *schema.ResourceData) bool {
sort.Strings(stateList)
sort.Strings(configList)

return reflect.DeepEqual(stateList, configList)
return stringInSlice(stateList, new)
}

func diffSuppressCustomSchemas(_, _, _ string, d *schema.ResourceData) bool {
Expand Down

0 comments on commit cbc7086

Please sign in to comment.