From 44d712d098e760b4d6e0ab6f437480bcea8f8689 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Tue, 13 Jun 2023 10:22:24 +0200 Subject: [PATCH] Refactor auth0_user_roles resource and its tests --- internal/auth0/user/resource_roles.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/auth0/user/resource_roles.go b/internal/auth0/user/resource_roles.go index 2d851a299..096d7c61d 100644 --- a/internal/auth0/user/resource_roles.go +++ b/internal/auth0/user/resource_roles.go @@ -57,6 +57,9 @@ func upsertUserRoles(ctx context.Context, data *schema.ResourceData, meta interf return diag.FromErr(err) } + userID := data.Get("user_id").(string) + data.SetId(userID) + return readUserRoles(ctx, data, meta) }