forked from public/stack
terraform_modules/digitalocean_database_cluster: pass necessary flags to psql
This commit is contained in:
parent
624a23d729
commit
c06e656e62
|
@ -39,13 +39,23 @@ resource "digitalocean_database_user" "default_users" {
|
|||
name = each.key
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "GRANT ALL ON DATABASE ${each.key} TO ${each.key}"
|
||||
interpreter = ["psql", "${local.base_connection_string}/${each.key}"]
|
||||
command = "GRANT ALL ON DATABASE ${each.key} TO ${each.key};"
|
||||
interpreter = [
|
||||
"psql",
|
||||
"-v", "ON_ERROR_STOP=1",
|
||||
"${local.base_connection_string}/${each.key}",
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "GRANT ALL ON SCHEMA public TO ${each.key}"
|
||||
interpreter = ["psql", "${local.base_connection_string}/${each.key}"]
|
||||
interpreter = [
|
||||
"psql",
|
||||
"-v", "ON_ERROR_STOP=1",
|
||||
"${local.base_connection_string}/${each.key}",
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
|
||||
# Note: provisioners depend on databases existing
|
||||
|
|
Loading…
Reference in New Issue