DBaaS Postgres Database

Creates and manages DbaaS Postgres Database objects.

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:

resource "ionoscloud_pg_database" "example_pg_database" {
  cluster_id = ionoscloud_pg_cluster.example.id
  name = "exampledatabase"
  owner = <user from the database>

Argument reference

  • cluster_id - (Required)[string] The unique ID of the cluster.

  • name - (Required)[string] The name of the database.

  • owner - (Required)[string] The owner of the database.


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

resource "ionoscloud_pg_database" "example" {

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

terraform import ionoscloud_pg_database.example {clusterId}/{name}

Last updated