Skip to content

Commit

Permalink
Fixed: [TF] data source "cloudconnexa_user" not working properly (#20)
Browse files Browse the repository at this point in the history
* Fixed: [TF] data source "cloudconnexa_user" not working properly

* updated go.mod

---------

Co-authored-by: Oleksandr Lytvyn <[email protected]>
  • Loading branch information
michaelfmnk and sahaqaa authored Jul 26, 2024
1 parent 547fc7d commit 2352d60
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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)
if err != nil {
return append(diags, diag.FromErr(err)...)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gruntwork-io/terratest v0.46.1
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.9
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.10
github.com/stretchr/testify v1.9.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.9 h1:1clb6wRbCjJXUM41Jrbe8/0LBYGNMnCA77QIGAAiUpQ=
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.9/go.mod h1:udq5IDkgXvMO6mQUEFsLHzEyGGAduhO0jJvlb9f4JkE=
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.10 h1:k5wx9syxxwNNKbfEQkVjb/4hjhBrhbgBDmeT72yNe3w=
github.com/openvpn/cloudconnexa-go-client/v2 v2.0.10/go.mod h1:udq5IDkgXvMO6mQUEFsLHzEyGGAduhO0jJvlb9f4JkE=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down

0 comments on commit 2352d60

Please sign in to comment.