Skip to content

Commit 5facf6a

Browse files
authored
fix: Properly handle null from being passed as password for additional_users (#223)
1 parent b741642 commit 5facf6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/postgresql/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ resource "google_sql_user" "additional_users" {
172172
for_each = local.users
173173
project = var.project_id
174174
name = each.value.name
175-
password = lookup(each.value, "password", random_id.user-password.hex)
175+
password = coalesce(each.value["password"], random_id.user-password.hex)
176176
instance = google_sql_database_instance.default.name
177177
depends_on = [null_resource.module_depends_on, google_sql_database_instance.default]
178178
}

0 commit comments

Comments
 (0)