Skip to content

Commit

Permalink
Merge pull request #307 from imperva/cpapke/remove-password-requirements
Browse files Browse the repository at this point in the history
Update password restriction, fix validation
  • Loading branch information
jsonar-cpapke authored Nov 21, 2023
2 parents 7577078 + 051648f commit 5a3e082
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions modules/aws/agentless-gw/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ variable "password" {
sensitive = true
description = "Initial password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/aws/hub/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ variable "password" {
sensitive = true
description = "Initial password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/aws/sonar-base-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ variable "password" {
sensitive = true
description = "Password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/azurerm/agentless-gw/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ variable "password" {
sensitive = true
description = "Initial password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/azurerm/hub/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ variable "password" {
sensitive = true
description = "Initial password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/azurerm/sonar-base-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ variable "password" {
sensitive = true
description = "Password for all users"
validation {
condition = var.password == null || try(length(var.password) > 8, false)
error_message = "Must be at least 8 characters. Used only if 'password_secret_name' is not set."
condition = var.password == null || try(length(var.password) >= 7, false)
error_message = "Must be at least 7 characters. Used only if 'password_secret_name' is not set."
}
}

Expand Down

0 comments on commit 5a3e082

Please sign in to comment.