Skip to content

Commit

Permalink
Merge pull request #32 from equinix-labs/update-password
Browse files Browse the repository at this point in the history
feat: validate user's password hash
  • Loading branch information
cprivitere authored Oct 1, 2024
2 parents 000dd0c + 789d8cc commit da23705
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 da23705

Please sign in to comment.