From 206f1a61b59d12e8ba05440db5dc94fe0b6ea46c Mon Sep 17 00:00:00 2001 From: Carlos Gajardo Date: Fri, 26 Apr 2024 12:48:32 -0400 Subject: [PATCH] Add ctx to data tags read call --- pagerdutyplugin/data_source_pagerduty_tag.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pagerdutyplugin/data_source_pagerduty_tag.go b/pagerdutyplugin/data_source_pagerduty_tag.go index 9d0e4d173..f162bb49c 100644 --- a/pagerdutyplugin/data_source_pagerduty_tag.go +++ b/pagerdutyplugin/data_source_pagerduty_tag.go @@ -52,14 +52,14 @@ func (d *dataSourceTag) Read(ctx context.Context, req datasource.ReadRequest, re var tags []*pagerduty.Tag err := retry.RetryContext(ctx, 2*time.Minute, func() *retry.RetryError { - list, err := d.client.ListTags(pagerduty.ListTagOptions{Query: searchTag}) + list, err := d.client.ListTagsPaginated(ctx, pagerduty.ListTagOptions{Query: searchTag, Limit: 100}) if err != nil { if util.IsBadRequestError(err) { return retry.NonRetryableError(err) } return retry.RetryableError(err) } - tags = list.Tags + tags = list return nil }) if err != nil {