Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rate limiting #334

Closed
1 task done
tobiasbp opened this issue Oct 12, 2023 · 5 comments
Closed
1 task done

Add support for rate limiting #334

tobiasbp opened this issue Oct 12, 2023 · 5 comments

Comments

@tobiasbp
Copy link

tobiasbp commented Oct 12, 2023

Terraform CLI and Provider Versions

Terraform: 1.6.1
Provider: 3.4.0

Use Cases or Problem Statement

To many requests to an API within a window of time, results in new requests being rejected.

Proposal

Add a 'rate_limit' setting which holds a number representing the number of requests per second the provider is allowed to perform.

How much impact is this issue causing?

High

Additional Information

The use case here is to get lots of organizations and users from an API and deploying those users and groups on another system using a dedicated Terraform provider for that platform. This is currently not possible because requests to the API holding the orgs and users are rejected after a certain number of requests have been made. If the rate of the requests could be controlled, it should be possible to find a rate at which the rejection issue would not occur.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tobiasbp
Copy link
Author

Would a PR for this be welcomed?

@bendbennett
Copy link
Contributor

Hi @tobiasbp 👋

Thank you for opening this issue. Prior to opening a PR, it might be worth seeing how many up-votes that this issue receives so that we have an indication of the level of community interest.

@bflad
Copy link
Contributor

bflad commented Oct 17, 2023

One thing to potentially consider when evaluating this feature request is whether this form of complexity is warranted in this generic HTTP request provider. Rate limiting tends to have varied solutions across APIs, whether it be header-based or undetectable. APIs with rate limiting requirements should likely have those sorts of behaviors encoded in their own provider, so practitioners needing to interface with the API do not need to implement specific configuration.

@tobiasbp
Copy link
Author

I think the problem I am trying to solve by adding rate limiting, will be solved if the connection making the HTTP requests could be reused. There is an issue for that here. I'll close this feature request.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants