Version bump, Style guide, dns records updates optional, and input validation
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
variable "authorized_keys" {
|
||||
default = []
|
||||
type = list(string)
|
||||
default = []
|
||||
description = "A list of SSH public keys to deploy for the root user on the newly created Linode instance."
|
||||
type = list(string)
|
||||
|
||||
validation {
|
||||
condition = alltrue([for key in var.authorized_keys : can(regex("^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp256|ssh-dss)", key))]) || length(var.authorized_keys) == 0
|
||||
error_message = "All authorized keys must be valid SSH public keys starting with ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, or ssh-dss."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user