# 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
```
