You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add rate limiting and retry configuration to Contentstack provider
- Add rate_limit, rate_burst, and max_retries provider attributes
- Update provider schema to support new rate limiting options
- Add automatic retry logic integration with contentstack-go-sdk
- Update provider documentation with new attributes
- Add simplified examples for provider and rate-limiting configurations
- Update go.mod to use enhanced contentstack-go-sdk with rate limiting
This enables reliable Terraform operations by automatically handling
Contentstack API rate limits (10 req/sec) with configurable throttling
and exponential backoff retry logic for 429 responses.
Related: contentstack-go-sdk rate limiting implementation
Copy file name to clipboardExpand all lines: docs/index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,3 +22,6 @@ description: |-
22
22
-`base_url` (String) The BaseURL, e.g. https://eu-api.contentstack.com/. See https://www.contentstack.com/docs/developers/apis/content-management-api/#base-url
23
23
-`branch` (String) The branch to manage resources in. If not specified, the main branch will be used.
24
24
-`management_token` (String, Sensitive) Management Tokens are stack-level tokens, with no users attached to them.
25
+
-`max_retries` (Number) The maximum number of retry attempts for 429 (rate limit) responses. Defaults to 3. Uses exponential backoff: 1s, 2s, 4s, 8s, 16s, capped at 30s.
26
+
-`rate_burst` (Number) The maximum burst size for rate limiting. Defaults to 10. This allows short bursts of requests above the rate limit.
27
+
-`rate_limit` (Number) The maximum number of requests per second to the Contentstack API. Defaults to 10.0 to comply with API limits. Set to 0 to disable rate limiting.
Description: "The branch to manage resources in. If not specified, the main branch will be used.",
55
55
},
56
+
"rate_limit": {
57
+
Type: types.Float64Type,
58
+
Optional: true,
59
+
Description: "The maximum number of requests per second to the Contentstack API. Defaults to 10.0 to comply with API limits. Set to 0 to disable rate limiting.",
60
+
},
61
+
"rate_burst": {
62
+
Type: types.Int64Type,
63
+
Optional: true,
64
+
Description: "The maximum burst size for rate limiting. Defaults to 10. This allows short bursts of requests above the rate limit.",
65
+
},
66
+
"max_retries": {
67
+
Type: types.Int64Type,
68
+
Optional: true,
69
+
Description: "The maximum number of retry attempts for 429 (rate limit) responses. Defaults to 3. Uses exponential backoff: 1s, 2s, 4s, 8s, 16s, capped at 30s.",
0 commit comments