# ionoscloud\_pg\_database

Manages a **DbaaS PgSql Database**.

## Example Usage

Create a `PgSQL` cluster as presented in the documentation for the cluster, then define a database resource and link it with the previously created cluster:

```hcl
resource "ionoscloud_pg_database" "example_pg_database" {
  cluster_id = ionoscloud_pg_cluster.example.id
  name = "exampledatabase"
  owner = "exampleuser"
}
```

## Argument reference

* `cluster_id` - (Required)\[string] The unique ID of the cluster. Immutable, forces re-creation.
* `name` - (Required)\[string] The name of the database. Immutable, forces re-creation.
* `owner` - (Required)\[string] The owner of the database. Immutable, forces re-creation.

## Import

In order to import a PgSql database, you can define an empty database resource in the plan:

```hcl
resource "ionoscloud_pg_database" "example" {
  
}
```

The resource can be imported using the `clusterId` and the `name`, for example:

```shell
terraform import ionoscloud_pg_database.example clusterid/name
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/resources/dbaas_pgsql_database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
