cockroachdb / terraform-provider-cockroach

Terraform provider for CockroachDB Cloud
Apache License 2.0
56 stars 10 forks source link

Work around race condition for endpoint connections #60

Closed erademacher closed 1 year ago

erademacher commented 1 year ago

Since the CCAPI job to accept endpoint connections is async, we can get into a state where the connection still shows as PENDING_ACCEPTANCE after it's been accepted. The old wait logic looked for ACCEPTED or PENDING, and failed out with other statuses, including PENDING_ACCEPTANCE. This change interprets that status the same as PENDING, and also lowers the timeout for connections (which usually only take a minute or less) to 5 minutes.