We use Terraform to manage Bitwarden credentials.
The way Terraform works is it stores the state of resources and compares the actual state via api calls and resources defined in code to provide a plan on what should happen. (What is Terraform | Terraform | HashiCorp Developer)
You can ‘apply’ the login items defined in code using terraform apply
. This results in a high number of API calls via the Bitwarden CLI to discover what the current state of the resources is (bw list
, bw get
), so afterwards it can perform correcting changes by executing a number of other Bitwarden CLI commands to correct issues (bw update
, bw create
).
I’m running against an issue where midway through applying the code the provider errors out with ‘Rate limit exceeded’.
I’ve tried searching for this error in the Bitwarden docs, the source code for the Terraform Bitwarden provider and in the Bitwarden github repos, but have not found any information on it. I can only assume Bitwarden did not expect people to use tools like Terraform to manage secrets in its product.
Since the high number of cli/api calls is endemic to Terraform, I’d like to know:
- If there even is a rate limit imposed by Bitwarden CLI or API or the issue lies somewhere else.
- If the rate limit does exist; why it exists.
- If the rate limit does exist; if we can increase it for our organization.
More evidence and technical info can be found in an issue I created on the Terraform Provider for Bitwarden: Receiving 'Rate limit exceeded' error on high number of api calls · Issue #61 · maxlaverse/terraform-provider-bitwarden · GitHub
The following issues on this community forum may be related but are unsolved: (I had to remove these links because new users are only allowed to have 2 links in their post.)