Expose a few more configurable items and add input validators
This commit is contained in:
+5
-2
@@ -1,6 +1,9 @@
|
||||
variable "region" {
|
||||
description = "The region where the droplet will be created"
|
||||
default = "nyc3"
|
||||
type = string
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = can(regex("^[a-z]{3}[0-9]$", var.region))
|
||||
error_message = "The region must be a valid DigitalOcean region format (e.g., nyc3, sfo3)."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user