From 5b6e41dc130a8fef24209613855e7daf874690de Mon Sep 17 00:00:00 2001 From: Glenn Musa <4622125+glennmusa@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:43:39 -0400 Subject: [PATCH] enforce windows complexity requirements (#284) --- src/terraform/modules/jumpbox/main.tf | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/terraform/modules/jumpbox/main.tf b/src/terraform/modules/jumpbox/main.tf index 4253dc5d4..04f0600b3 100644 --- a/src/terraform/modules/jumpbox/main.tf +++ b/src/terraform/modules/jumpbox/main.tf @@ -34,10 +34,21 @@ resource "azurerm_key_vault" "jumpbox-keyvault" { tags = var.tags } +resource "random_integer" "jumpbox-password-length" { + min = 8 + max = 123 +} + resource "random_password" "jumpbox-password" { - length = 16 - special = true - override_special = "_%@" + length = random_integer.jumpbox-password-length.result + upper = true + lower = true + number = true + special = true + min_upper = 1 + min_lower = 1 + min_numeric = 1 + min_special = 1 } resource "azurerm_key_vault_secret" "jumpbox-password" {