add credential handling for multiple user/dbs
This commit is contained in:
parent
9539b43f7d
commit
d928465802
1 changed files with 14 additions and 0 deletions
|
|
@ -39,3 +39,17 @@ output "postgres_user_id" {
|
||||||
value = stackit_postgresflex_user.this.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
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue