add credential handling for multiple user/dbs

This commit is contained in:
Michael_Messmer 2025-09-08 14:03:42 +02:00
parent 9539b43f7d
commit d928465802

View file

@ -39,3 +39,17 @@ output "postgres_user_id" {
value = stackit_postgresflex_user.this.user_id
}
output "postgres_credentials" {
value = {
for k, u in stackit_postgresflex_user.this :
k => {
host = u.host
username = u.username
password = u.password
port = u.port
db_name = stackit_postgresflex_database.this[u.owner].name
uri = u.uri
}
}
sensitive = true
}