From 89b00985999dd916be34c524462b3321295991d0 Mon Sep 17 00:00:00 2001 From: Anisimova Karina <51861302+Karina5005@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:33:36 +0300 Subject: [PATCH] fix: Add min_lower param to password (#10) --- README.md | 2 +- main.tf | 1 + variables.tf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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 = {} }