Skip to content

Commit bca69c4

Browse files
nagomisoimrannayer
andauthored
feat: Add output to retrieve passwords by user name for additional_users (#719)
Co-authored-by: Imran Nayer <[email protected]>
1 parent 923b770 commit bca69c4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

modules/postgresql/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ module "pg" {
182182

183183
| Name | Description |
184184
|------|-------------|
185+
| additional\_user\_passwords\_map | Map of auto generated passwords for the additional users |
185186
| additional\_users | List of maps of additional users and passwords |
186187
| apphub\_service\_uri | Service URI in CAIS style to be used by Apphub. |
187188
| dns\_name | DNS name of the instance endpoint |

modules/postgresql/outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ output "additional_users" {
115115
sensitive = true
116116
}
117117

118+
output "additional_user_passwords_map" {
119+
description = "Map of auto generated passwords for the additional users"
120+
value = { for u in google_sql_user.additional_users : u.name => u.password }
121+
sensitive = true
122+
}
123+
118124
output "iam_users" {
119125
description = "The list of the IAM users with access to the CloudSQL instance"
120126
value = var.iam_users

0 commit comments

Comments
 (0)