Expose a few more configurable items and add input validators
This commit is contained in:
+5
-2
@@ -1,6 +1,9 @@
|
||||
variable "size" {
|
||||
description = "The slug indicating the size of the droplet"
|
||||
default = "s-1vcpu-1gb"
|
||||
type = string
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = can(regex("^[a-zA-Z0-9-]+$", var.size))
|
||||
error_message = "The size must be a valid DigitalOcean size slug (e.g., s-1vcpu-1gb)."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user