Skip to content

Commit

Permalink
feat: validate user's password hash
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Privitere <[email protected]>
  • Loading branch information
cprivitere committed Oct 1, 2024
1 parent 000dd0c commit 789d8cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ variable "esxi_ntp_server" {
}
variable "esxi_password" {
type = string
sensitive = true
description = "mkpasswd Pre-hashed root password to be set for ESXi instances (Hash the password from vcf-ems-deployment-parameter.xlsx > Credentials Sheet > C8 using 'mkpasswd --method=SHA-512' from Linux whois package)"
validation {
condition = length(var.esxi_password) > 98 && substr(var.esxi_password, 0, 3) == "$6$"
error_message = "The esxi_password value must be a valid SHA 512 password hash, starting with \"$6$\". Use 'mkpasswd --method=SHA-512' from the whois package to generate a valid hash."
}
}
variable "esxi_plan" {
type = string
Expand Down

0 comments on commit 789d8cc

Please sign in to comment.