terraform-provider-digitalocean
terraform-provider-digitalocean copied to clipboard
Support creating a connection pool for a replica database
Hi!
I'm not sure this is a bug or a feature request but in order to not be grumpy and demanding I'm calling it a feature request.
I'm trying to create a connection pool for a digitalocean_database_replica
but terraform returns a 404 error. I'm not sure if this is supposed to work (bug) or never intended to work (feature request).
Given this configuration:
resource "digitalocean_database_connection_pool" "landfolk_sandbox_landfolk_sandbox_ro" {
cluster_id = digitalocean_database_replica.landfolk.id
db_name = digitalocean_database_db.sandbox.name
user = digitalocean_database_user.landfolk_sandbox_ro.name
name = "sandbox-sandbox_ro"
mode = "transaction"
size = 10
I get this output:
Error: Error creating DatabaseConnectionPool: POST https://api.digitalocean.com/v2/databases/adf6100c-d4ab-4e70-ac4c-e7a7fa16a90f/replicas/landfolk-read-replica/pools: 404 (request "6d24dd53-c2fb-4475-9093-f40f62706a47") 404 page not found
Looking at the digitalocean api documentation it's unclear how to correctly reference the read replica. I would have expected that the read replica has a unique id (that is not in the form of <parent cluster id>/replicas/<replica name>
.
Looking at the browser console when doing this operation in the digitalocean ui I see this request:
Request URL: https://cloud.digitalocean.com/api/v1/dbaas/clusters/landfolk-read-replica/pools Request Method: POST
Am I holding it wrong or is it correct that creating a connection pool for a replica is not supported in terraform?