Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
Final update to get a stable master again
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumew committed Apr 18, 2019
1 parent 4955e91 commit f40b4e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion okta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Config struct {
retryCount int
parallelism int
waitForReset bool
backoff bool

articulateOktaClient *articulateOkta.Client
oktaClient *okta.Client
Expand All @@ -39,7 +40,8 @@ func (c *Config) loadAndValidate() error {
WithOrgUrl(orgUrl).
WithToken(c.apiToken).
WithCache(false).
WithWaitForLimitReset(c.waitForReset).
WithBackoff(c.backoff).
WithWaitForLimitReset(c.waitForReset && c.backoff != true).
WithRetries(int32(c.retryCount))
client := okta.NewClient(config, nil, nil)
c.supplementClient = &ApiSupplement{
Expand Down
12 changes: 9 additions & 3 deletions okta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,22 @@ func Provider() terraform.ResourceProvider {
Default: 1,
Description: "Number of concurrent requests to make within a resource where bulk operations are not possible. Take note of https://developer.okta.com/docs/api/getting_started/rate-limits.",
},
"wait_for_rate_limit": {
"backoff": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Description: "Wait until rate limit is reset before making any additional requests.",
Description: "Use exponential back off strategy for rate limits.",
},
"wait_for_rate_limit": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Wait until rate limit is reset before making any additional requests. Experimental at this point.",
},
"max_retries": {
Type: schema.TypeInt,
Optional: true,
Default: 5,
Default: 10,
ValidateFunc: validation.IntAtMost(100), // Have to cut it off somewhere right?
Description: "maximum number of retries to attempt before erroring out.",
},
Expand Down

0 comments on commit f40b4e6

Please sign in to comment.