> For the complete documentation index, see [llms.txt](https://docs.ionos.com/terraform-provider/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/terraform-provider/data-sources/dbaas_pgsql_database.md).

# ionoscloud\_pg\_database

The **PgSql Database data source** can be used to search for and return an existing PgSql database.

## Example Usage

```hcl
data "ionoscloud_pg_database" "example" {
   cluster_id = "cluster_id"
   name   = "databasename"
}
```

## Argument Reference

* `cluster_id` - (Required)\[string] The ID of the cluster.
* `name` - (Required)\[string] Name of an existing database that you want to search for.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - \[string] The id of the database.
* `owner` - \[string] The owner of the database.
