Skip to content

Rate Limit Error Handling #112

@AdamVB

Description

@AdamVB

When creating a lot of integrations (e.g. domain scans), we sometimes hit a rate limit, this leads to an inconsistent terraform state. The sdk should throttle requests when rate limits are reached.

  ╷
  │ Error: Client Error
  │
  │   with mondoo_integration_domain.domain_integration["test.com"],
  │   on main.tf line 16, in resource "mondoo_integration_domain" "domain_integration":
  │   16: resource "mondoo_integration_domain" "domain_integration" {
  │
  │ Unable to create domain integration. Got error: rpc error: code =
  │ ResourceExhausted desc = rate limit exceeded for
  │ "generate_registration_token.rate". Max rate allowed is 0.03 tokens/sec
  ╵
  ╷
  │ Error: Missing Resource State After Create
  │
  │   with mondoo_integration_domain.domain_integration["test.com"],
  │   on main.tf line 16, in resource "mondoo_integration_domain" "domain_integration":
  │   16: resource "mondoo_integration_domain" "domain_integration" {
  │
  │ The Terraform Provider unexpectedly returned no resource state after having
  │ no errors in the resource creation. This is always an issue in the
  │ Terraform Provider and should be reported to the provider developers.
  │
  │ The resource may have been successfully created, but Terraform is not
  │ tracking it. Applying the configuration again with no other action may
  │ result in duplicate resource errors. Import the resource if the resource
  │ was actually created and Terraform should be tracking it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions