Skip to content

Commit

Permalink
Fixed: [TF] data source "cloudconnexa_user" not working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfmnk committed Jul 26, 2024
1 parent b4ff2f4 commit 601890b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudconnexa/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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)

Check failure on line 106 in cloudconnexa/data_source_user.go

View workflow job for this annotation

GitHub Actions / lint

c.Users.GetByUsername undefined (type *"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa".UsersService has no field or method GetByUsername)) (typecheck)

Check failure on line 106 in cloudconnexa/data_source_user.go

View workflow job for this annotation

GitHub Actions / lint

c.Users.GetByUsername undefined (type *"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa".UsersService has no field or method GetByUsername) (typecheck)

Check failure on line 106 in cloudconnexa/data_source_user.go

View workflow job for this annotation

GitHub Actions / lint

c.Users.GetByUsername undefined (type *"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa".UsersService has no field or method GetByUsername)) (typecheck)
if err != nil {
return append(diags, diag.FromErr(err)...)
}
Expand Down

0 comments on commit 601890b

Please sign in to comment.