Skip to content

Commit

Permalink
fix: Properly handle null from being passed as password for additiona…
Browse files Browse the repository at this point in the history
…l_users (#223)
  • Loading branch information
Ulminator committed May 27, 2021
1 parent b741642 commit 5facf6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/postgresql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ resource "google_sql_user" "additional_users" {
for_each = local.users
project = var.project_id
name = each.value.name
password = lookup(each.value, "password", random_id.user-password.hex)
password = coalesce(each.value["password"], random_id.user-password.hex)
instance = google_sql_database_instance.default.name
depends_on = [null_resource.module_depends_on, google_sql_database_instance.default]
}
Expand Down

0 comments on commit 5facf6a

Please sign in to comment.