---
title: digitalocean_database_connection_pool
description: Provides information on a DigitalOcean PostgreSQL database connection pool.
product: Reference
url: https://docs.digitalocean.com/reference/terraform/reference/data-sources/database_connection_pool/
last_updated: "2026-11-05"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# digitalocean_database_connection_pool

Generated on 5 Nov 2026 from Terraform version [`v2.107.0`](https://github.com/digitalocean/terraform-provider-digitalocean/releases/tag/v2.107.0)

Provides information on a DigitalOcean PostgreSQL database connection pool.

## Example Usage

```hcl
data "digitalocean_database_cluster" "example" {
  name = "example-cluster"
}
data "digitalocean_database_connection_pool" "read-only" {
  cluster_id = data.digitalocean_database_cluster.example.id
  name       = "pool-01"
}
output "connection_pool_uri_output" {
  value = data.digitalocean_database_connection_pool.read-only.uri
}
```

## Argument Reference

The following arguments are supported:

- `cluster_id` - (Required) The ID of the original source database cluster.
- `name` - (Required) The name for the database connection pool.

## Attributes Reference

The following attributes are exported:

- `id` - The ID of the database connection pool.
- `host` - Connection pool hostname.
- `private_host` - Same as `host`, but only accessible from resources within the account and in the same region.
- `port` - Network port that the connection pool is listening on.
- `uri` - The full URI for connecting to the database connection pool.
- `private_uri` - Same as `uri`, but only accessible from resources within the account and in the same region.
- `db_name` - Name of the connection pool’s default database.
- `size` - Size of the connection pool.
- `mode` - The transaction mode for the connection pool.
- `user` - Username for the connection pool’s default user.
- `password` - Password for the connection pool’s default user.