From 601890bd48b6935936c064e81b3718b8570835e1 Mon Sep 17 00:00:00 2001 From: michaelfmnk Date: Fri, 26 Jul 2024 13:39:04 +0200 Subject: [PATCH] Fixed: [TF] data source "cloudconnexa_user" not working properly --- cloudconnexa/data_source_user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudconnexa/data_source_user.go b/cloudconnexa/data_source_user.go index 71138fe..d327f44 100644 --- a/cloudconnexa/data_source_user.go +++ b/cloudconnexa/data_source_user.go @@ -28,7 +28,7 @@ func dataSourceUser() *schema.Resource { }, "role": { Type: schema.TypeString, - Required: true, + Computed: true, Description: "The type of user role. Valid values are `ADMIN`, `MEMBER`, or `OWNER`.", }, "email": { @@ -103,7 +103,7 @@ func dataSourceUserRead(ctx context.Context, d *schema.ResourceData, m interface c := m.(*cloudconnexa.Client) var diags diag.Diagnostics userName := d.Get("username").(string) - user, err := c.Users.Get(userName) + user, err := c.Users.GetByUsername(userName) if err != nil { return append(diags, diag.FromErr(err)...) }