From d00799defc9c22eb90352ef3688600d1fda772f9 Mon Sep 17 00:00:00 2001 From: Ivan Savciuc Date: Fri, 19 Jan 2024 13:58:48 +0200 Subject: [PATCH] fix(org): org user datasource (#1544) --- CHANGELOG.md | 2 ++ .../service/organization/organization_user_data_source.go | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13001b502..40326a862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ nav_order: 1 ## [MAJOR.MINOR.PATCH] - YYYY-MM-DD +- Fix `aiven_organization_user` datasource get method + ## [4.13.0] - 2024-01-12 - Add organization application users support diff --git a/internal/sdkprovider/service/organization/organization_user_data_source.go b/internal/sdkprovider/service/organization/organization_user_data_source.go index e9465e6ac..0dbcd8c49 100644 --- a/internal/sdkprovider/service/organization/organization_user_data_source.go +++ b/internal/sdkprovider/service/organization/organization_user_data_source.go @@ -59,15 +59,15 @@ func datasourceOrganizationUserRead(ctx context.Context, d *schema.ResourceData, var found int - var user *aiven.OrganizationMemberInfo + var user aiven.OrganizationMemberInfo for _, u := range rm.Users { if userEmail != "" && u.UserInfo.UserEmail == userEmail { - user = &u + user = u found++ } if userID != "" && u.UserID == userID { - user = &u + user = u found++ } }