# ionoscloud\_pg\_user

Manages a **DbaaS PgSql User**.

## Example Usage

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

```hcl
resource "ionoscloud_pg_user" "example_pg_user" {
  cluster_id = ionoscloud_pg_cluster.example.id
  username = "exampleuser"
  password = random_password.user_password.result
}

resource "random_password" "user_password" {
  length           = 16
  special          = true
  override_special = "!#$%&*()-_=+[]{}<>:?"
}
```

## Argument reference

* `cluster_id` - (Required)\[string] The unique ID of the cluster. Updates to the value of the field force the cluster to be re-created.
* `username` - (Required)\[string] Used for authentication. Updates to the value of the field force the cluster to be re-created.
* `password` - (Required)\[string] User password.
* `is_system_user` - (Computed)\[bool] Describes whether this user is a system user or not. A system user cannot be updated or deleted.

## Import

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

```hcl
resource "ionoscloud_pg_user" "example" {
  
}
```

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

```shell
terraform import ionoscloud_pg_user.example clusterid/username
```


---

# 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_user.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.
