diff --git a/README.md b/README.md index b04b64c..07d0b49 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ No modules. | [lc\_ctype](#input\_lc\_ctype) | Character classification `LC_CTYPE` to use in the database | `string` | `"C"` | no | | [make\_owner](#input\_make\_owner) | Set role as an owner of database | `bool` | `false` | no | | [name](#input\_name) | The name of the database | `string` | n/a | yes | -| [password](#input\_password) | Owner role's password parameters |
object({
length = optional(number, 20)
special = optional(bool, false)
min_numeric = optional(number, 2)
})
| `{}` | no | +| [password](#input\_password) | Owner role's password parameters |
object({
length = optional(number, 20)
special = optional(bool, false)
min_numeric = optional(number, 2)
min_lower = optional(number, 2)
})
| `{}` | no | | [privileges](#input\_privileges) | The list of privileges to grant role for the database | `list(string)` |
[
"CONNECT",
"CREATE",
"TEMPORARY"
]
| no | | [role](#input\_role) | The name of the role, default - name of database | `string` | `null` | no | diff --git a/main.tf b/main.tf index 0193850..37d2d12 100644 --- a/main.tf +++ b/main.tf @@ -12,6 +12,7 @@ resource "random_password" "password" { length = var.password.length special = var.password.special min_numeric = var.password.min_numeric + min_lower = var.password.min_lower } resource "postgresql_role" "role" { diff --git a/variables.tf b/variables.tf index 0a8cc01..e5adabe 100644 --- a/variables.tf +++ b/variables.tf @@ -56,6 +56,7 @@ variable "password" { length = optional(number, 20) special = optional(bool, false) min_numeric = optional(number, 2) + min_lower = optional(number, 2) }) default = {} }