Skip to content

Commit

Permalink
fix: [PL-57016]: Setting user_emails only if users is not set in read…
Browse files Browse the repository at this point in the history
… user group v2 (#1058)
  • Loading branch information
niketan-nath authored Sep 12, 2024
1 parent f484188 commit 84985dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/service/platform/usergroup/usergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ func readUserGroupV2(d *schema.ResourceData, env *nextgen.UserGroupResponseV2, u
d.Set("name", env.Name)
d.Set("description", env.Description)
d.Set("tags", helpers.FlattenTags(env.Tags))
d.Set("user_emails", ignoreOrderIfAllElementsMatch(user_emails, flattenUserInfo(env.Users)))
if _, ok := d.GetOk("users"); !ok {
d.Set("user_emails", ignoreOrderIfAllElementsMatch(user_emails, flattenUserInfo(env.Users)))
}
d.Set("notification_configs", flattenNotificationConfig(env.NotificationConfigs))
d.Set("linked_sso_id", env.LinkedSsoId)
d.Set("linked_sso_display_name", env.LinkedSsoDisplayName)
Expand Down

0 comments on commit 84985dd

Please sign in to comment.