Expose a few more configurable items and add input validators
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
variable "domain_name" {
|
||||
description = "The domain name to use for the droplet's DNS record"
|
||||
default = "example.com"
|
||||
type = string
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = can(regex("^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", var.domain_name))
|
||||
error_message = "The domain name must be a valid fully-qualified domain name (e.g., example.com)."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user