From 2f79b47abbb2e691998f3628a075c2a040fa0125 Mon Sep 17 00:00:00 2001 From: Bogdan Prodan Date: Wed, 16 Dec 2020 22:52:19 +0200 Subject: [PATCH] Merged with master --- okta/data_source_okta_group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/okta/data_source_okta_group.go b/okta/data_source_okta_group.go index 92d43b0aa..1be17c4e3 100644 --- a/okta/data_source_okta_group.go +++ b/okta/data_source_okta_group.go @@ -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)