Skip to content

Commit 93770b3

Browse files
Fix database password output to return password even with IAM auth enabled
The password is needed by the master user to create IAM-enabled database users. Previously returned null when IAM auth was enabled, causing null_resource provisioner to fail.
1 parent c2e9b1f commit 93770b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/database/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ output "name" {
1212
}
1313

1414
output "password" {
15-
value = var.enable_iam_database_authentication ? null : aws_db_instance.postgresql.password
16-
description = "The password of the PostgreSQL user. Returns null when IAM authentication is enabled."
15+
value = aws_db_instance.postgresql.password
16+
description = "The password of the PostgreSQL master user. Required for creating IAM-enabled database users."
1717
sensitive = true
1818
}
1919

0 commit comments

Comments
 (0)