Skip to content

Commit 714d0f7

Browse files
authored
Merge pull request #368 from SumoLogic/INVS-231_infinite_loop_with_more_than_100_match_list_items
INVS-231: Fix bug preventing to create more than 100 cse match list items in one run
2 parents 3a6b87d + 4654416 commit 714d0f7

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ FEATURES:
55

66
BUG FIXES:
77
* Add CRITICAL as a valid value for cse_custom_insight severity field (GH-367)
8+
* Fix bug preventing to create more than 100 cse match list items within a cs_match_list (GH-368)
89

910
## 2.14.0 (March 30, 2022)
1011

sumologic/resource_sumologic_cse_match_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func resourceSumologicCSEMatchListCreate(d *schema.ResourceData, meta interface{
198198
if err != nil {
199199
return 0, "", err
200200
}
201-
return resp, fmt.Sprint(len(resp.CSEMatchListItemsGetObjects)), nil
201+
return resp, fmt.Sprint(resp.Total), nil
202202
},
203203
Timeout: d.Timeout(schema.TimeoutCreate),
204204
Delay: 10 * time.Second,
@@ -288,7 +288,7 @@ func resourceSumologicCSEMatchListUpdate(d *schema.ResourceData, meta interface{
288288
if err != nil {
289289
return 0, "", err
290290
}
291-
return resp, fmt.Sprint(len(resp.CSEMatchListItemsGetObjects)), nil
291+
return resp, fmt.Sprint(resp.Total), nil
292292
},
293293
Timeout: d.Timeout(schema.TimeoutUpdate),
294294
Delay: 10 * time.Second,

sumologic/sumologic_cse_match_list_item.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ type CSEMatchListItemsInMatchListResponse struct {
106106

107107
type CSEMatchListItemsInMatchListGet struct {
108108
CSEMatchListItemsGetObjects []CSEMatchListItemGet `json:"objects"`
109+
Total int `json:"total"`
109110
}
110111

111112
type CSEMatchListItemPost struct {

0 commit comments

Comments
 (0)