From 4c19eff9b4ca661434ef87860ac6034eb3d6209b Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Wed, 11 Dec 2024 11:27:31 +0100 Subject: [PATCH] use create user mutation --- internal/resource/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/resource/user.go b/internal/resource/user.go index 12c7a2b..afb9e39 100644 --- a/internal/resource/user.go +++ b/internal/resource/user.go @@ -87,13 +87,13 @@ func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, r return } - response, err := r.client.UpdateUser(ctx, nil, data.Attributes()) + response, err := r.client.CreateUser(ctx, data.Attributes()) if err != nil { resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to create user, got error: %s", err)) return } - data.From(response.UpdateUser) + data.From(response.CreateUser) resp.Diagnostics.Append(resp.State.Set(ctx, data)...) }