Expose a few more configurable items and add input validators
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
variable "host_name" {
|
||||
description = "The hostname for the droplet"
|
||||
default = "hello-world"
|
||||
type = string
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = can(regex("^[a-zA-Z0-9-]+$", var.host_name))
|
||||
error_message = "The host name can only contain alphanumeric characters and hyphens."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user