confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
118 stars 61 forks source link

custom connector deployment and generic API error #349

Open petrkarytka opened 5 months ago

petrkarytka commented 5 months ago

Hello! I faced the error during a custom connector deployment:

Error: error creating Connector "hr-worker-conn-scheduled-source-workday": Post "https://api.confluent.cloud/connect/v1/environments/env-******/clusters/lkc-******/connectors": giving up after 11 attempt(s)

When I tried to create the connector via portal UI I got another error, explicitly pointing on what caused the behavior:

failed to create custom connector: failed to ensure extra setup for custom connector: failed to ensure custom connector setup: failed to ensure logging setup: Unable to add rbac roles for service account: 402 Payment Required

And indeed, we reached the RBAC limit at that moment. As we sorted out later with the Confluent support team (ticket #193267), some role bindings are created automatically during the deployment (and counted towards the cluster/org quotas).

Please consider handling this error in Terraform with more accurate description. Currently the error looks like some API rate limitation and it's a bit confusing.