Manage Aiven for PostgreSQL® service users
Create and manage service users in your Aiven for PostgreSQL® service to control access to its databases and tables.
Service users only exist in the scope of the Aiven service.
They are unique to the service and not shared with any other services.
Every service has a default avnadmin user with full access to the service.
Add a service user
- Aiven Console
- Aiven CLI
- Aiven API
- Terraform
- In your service, click Users.
- Click Add service user or Create user.
- Enter a name for your service user.
- Set up all the other configuration options. If a password is required, a random password is generated automatically. You can change it later.
- Click Add service user.
Run the avn service user-create command:
avn service user-create SERVICE_NAME --username USERNAME
Replace the following:
SERVICE_NAME: the name of your Aiven for PostgreSQL service.USERNAME: the name of the service user to create.
Use the ServiceUserCreate endpoint:
curl --request POST \
--url https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME/user \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"username": "USERNAME"}'
Replace the placeholders with your project name, service name, bearer token, and the username to create.
Use the
aiven_pg_user resource
to create and manage service users.
Related pages