Skip to content

Commit 89978ee

Browse files
authored
Update data_source.go | Use id (member ID) instead of userId as per SignalFx API documentation (#606)
* Update data_source.go | Use id (member ID) instead of userId as per SignalFx API documentation Updated the code to use id (member ID) instead of userId in accordance with the SignalFx Observability API documentation. The id field uniquely identifies a member and should be used in all references. This ensures consistency and aligns with the latest API expectations. Reference: https://dev.splunk.com/observability/reference/api/organizations/latest * Update data_source_test.go Updating the test file to use Id instead of UserId
1 parent 120753d commit 89978ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/definition/organization/data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func datasourceRead(ctx context.Context, rd *schema.ResourceData, meta any) diag
5050

5151
for _, u := range results.Results {
5252
tflog.Debug(ctx, "Retrieved user details", tfext.NewLogFields().JSON("user", u))
53-
users = append(users, u.UserId)
53+
users = append(users, u.Id)
5454
}
5555

5656
if offset >= int(results.Count) {

internal/definition/organization/data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func TestDataSourceRead(t *testing.T) {
8585
_ = json.NewEncoder(w).Encode(&organization.MemberSearchResults{
8686
Count: 1,
8787
Results: []*organization.Member{
88-
{FullName: "user 01", UserId: "AAAAAAAA", Email: "user-01@example.com"},
88+
{FullName: "user 01", Id: "AAAAAAAA", Email: "user-01@example.com"},
8989
},
9090
})
9191
},

0 commit comments

Comments
 (0)