Skip to content

Commit

Permalink
Merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanprodan-okta committed Dec 16, 2020
1 parent 0d2fba4 commit 2f79b47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions okta/data_source_okta_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func findGroup(ctx context.Context, name string, d *schema.ResourceData, m inter
}
return diag.Errorf("group with name '%s' does not exist", name)
} else if len(groups) > 1 {
fmt.Println("Found multiple groups with the supplied parameters. Using the first one which may only be a partial match.")
logger(m).Warn("Found multiple groups with the supplied parameters: using the first one which may only be a partial match", "name", groups[0].Profile.Name)
} else if len(groups[0].Profile.Name) != len(name) {
fmt.Println("Group with exact match to the supplied name not found. Using partial match which contains name as a substring.")
logger(m).Warn("The group with an exact match to the supplied name was not found: using partial match which contains name as a substring", "name", groups[0].Profile.Name)
}
d.SetId(groups[0].Id)
_ = d.Set("description", groups[0].Profile.Description)
Expand Down

0 comments on commit 2f79b47

Please sign in to comment.