Creating Postgres users v23
To create Postgres users during deployment, add entries to the list of
cluster_vars or a particular instance's
vars in config.yml:
The example above would create two users (apart from any users that TPA itself decides to create, such as repmgr or barman).
Each entry must specify the
username to create.
Any roles in the
granted_roles list will be granted to the
role_attrs list may contain certain
CREATE ROLE options
[NO]LOGIN (to create a
user or a role) etc.
By default, TPA will generate a random password for the user, and
store it in a vault-encrypted variable named
the cluster's inventory. You can retrieve the value later:
You cannot explicitly specify a password in config.yml, but you can
store a different
<username>_password in the inventory instead:
If you don't want the user to have a password at all, you can set
- On this page
- Password generation