Skip to content

Commit

Permalink
fix: use pagination for data source metal_devices (#768)
Browse files Browse the repository at this point in the history
The data source `metal_devices` fails to retrieve all hosts within a
project. This PR uses `ExecuteWithPagination` to retrieve the full list
of resources.
  • Loading branch information
thecodingrobot authored Sep 3, 2024
1 parent a421036 commit 9709376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions equinix/data_source_metal_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func getDevices(ctx context.Context, d *schema.ResourceData, meta interface{}, e
if len(search) > 0 {
query = query.Search(search)
}
devices, _, err = query.Execute()
devices, err = query.ExecuteWithPagination()
}

if len(orgID) > 0 {
Expand All @@ -81,7 +81,7 @@ func getDevices(ctx context.Context, d *schema.ResourceData, meta interface{}, e
if len(search) > 0 {
query = query.Search(search)
}
devices, _, err = query.Execute()
devices, err = query.ExecuteWithPagination()
}

for _, d := range devices.Devices {
Expand Down

0 comments on commit 9709376

Please sign in to comment.